Importing Postman Collections

Importing a Collection

import_collection

The first and most critical step in importing Postman Collections is importing the collection itself.

  • First, open the HTTP Client via the Tools menu.
  • Click the gray Import button at the top of the client.
  • Select your collection in the popup window.
  • Click Open.
  • The routes from your collection are now available in the list of saved requests.

Importing Postman Environments

import_env

Importing an environment is just as simple as importing the collection itself.

  • First, inside of a test, click on the Data Sets button on the left pane.
  • Click the orange Postman button.
  • Select your environments file from the popup.
  • Your environmental variables will now be available in the Data Sets pane.

Importing Postman Global Variables

import_globals

The process for importing global variables from Postman is nearly identical to the process for importing environmental variables. The primary difference is where the import itself is executed.

  • First access the Vault via the Tools menu at the top of any view.
  • Select the project that you want to access the variables through, or select the Global Vault if you want all of your projects to have access to the variable definitions.
  • Click the Variables button in the specific Vault that was chosen.
  • Click the Import Variables from Postman button.
  • Select your global variables file and click the Open button.
  • Your global variable definitions can now be accessed from the connected project(s).

Build from Postman Collections

API Fortress can now generate a test from a Postman collection!

The first step is exporting your collection from within Postman.

collection

Next to your Collection name click the ellipsis (three dots) … then click Export and choose ‘Collection v2.’

export exportCollectionV2

Once you’ve exported the collection from Postman, go to API Fortress and create a New Test.

newTest

On the interstitial page, click Build from Spec.

buildFromSpec

On the following page, choose Postman Collection from the dropdown menu, and upload the collection file we exported. Click Save.

specFile

For a new test, choose From Scratch and then click the check. If you were updating a test, you would use the Merge option.

buildoptions

This imports the API call to the composer. Now we can use this to call the payload and build a test automatically!

testcreated

The easiest way to create a test is using our Magic tool. To do so you need to import the call into the console. First, select the call in the composer, which will highlight it. Open the HTTP Client and click the import button, highlighted below.

Screen Shot 2018-03-30 at 11.34.09 AM

When the call is in the console, click the Send button and you will see the response.

Screen Shot 2018-03-30 at 11.46.57 AM

At this point, the Magic tool can generate the test for you. Click the “Generate Test” button, highlighted in the image below. Click Continue a few times and voila, a complete API test generated without having to write any code.
Screen Shot 2018-03-30 at 11.43.58 AM

You can then review the test, seen below, and add some more logic. You’ve successfully created a test from a Postman collection!

Screen Shot 2018-03-30 at 11.34.58 AM