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

 

 

 

Build from Mashery

You can now generate a draft an API test from the I/O Docs in your Mashery account!

On the test interstitial page there is a “Build from Mashery” button. Click it, enter the Username, Password and Area ID from your Mashery account.

Area ID can be found when you login to your Mashery account. In the top right under Customer name.

Screen Shot 2017-04-06 at 7.00.07 AM Screen Shot 2017-04-06 at 7.00.16 AM

Choose the I/O Doc you want to use, and then click the lightning bolt.

You can also have API Fortress generate some assertions for you by using the ‘magic’ tool. From the composer, click the “import the request into the console” button from the top navigation. The HTTP console will open. From there insert the required values and make the call. Finally, click the Magic Wand icon (skip the global/input set generation step) and that’s it. An API test is created for you!

From here you can add more intelligence to the test. Maybe make it an integration test with more calls, or add an IF statement. A lot of options are at your disposal.

ezgif.com-video-to-gif

Build from Apiary

Introduction
If you have the right level Apiary account (any paid account), you can generate a test from your Apiary docs. It’s as simple as a few clicks.

Directions
This GIF pretty much explains it, but from the test composer interstitial page, there is a Build from Apiary button. Click it, login to your Apiary account, and choose which Blueprint to create a test from. Simple, right?

Don’t forget that this is a test draft. Add more logic to it for a really awesome test. Maybe add more calls to it as well to create a proper integration test.
build-from-apiary