Postman Collections are great! They’re a terrific way to keep your API specifications organized. API Fortress is fully capable of consuming Postman Collections and using them to quickly generate functional API tests. In this article, we’re going to take a look at extending this process a step further and going from a Postman Collection to a functional API load test in just a few steps.
If you’re not familiar, a Postman Collection looks like this:
This JSON file contains the definition for a collection of API endpoints. In this case, it’s a collection based on the definition of the API Fortress demonstration API. Before starting this tutorial, we’ve gone ahead and exported the collection from Postman.
Next, we’re going to use this Postman Collection to create a functional API Test.
Here’s a breakdown of what’s going on in the above GIF:
1. First, create a new test
2. Then, select Build from Specification File
3. Select Postman Collections and import the file.
4. Select the route from the Collection
5. Click Generate Test
Now we have a functional API test that we can execute against our endpoint! The best part is that it only took us a few short steps and used a Postman Collection that we already had. Now, we’re going to take this a step further and use the functional API test that we created to create a functional API Load Test.
1. Publish your saved test.
2. Open Load Testing via the Tools menu
3. Create a New Task (green button at the top of the view)
4. Name the task, select the project and test we created from the Postman Collection, and select the other options for your load test (duration, users, etc.)
5. Execute the load test by pressing the play button.
It really is that easy to go from a Postman Collection to a Functional Load Test with API Fortress. What’s more is that you can do this same process with almost any API specification file. API Fortress can generate a functional API test with a Postman Collection, Swagger/OpenAPI file, RAML, I/O Docs, API Blueprint and more. What we’re left with at the end of the process is a detailed report on how our API responded under load.