Load Testing Postman Collections
Postman is one of the best-in-market tools for functional testing of APIs. As a Postman user, you organize your API tests into collections of requests. While this is great for functional testing, it’s also important to understand how API endpoints perform under load.
The presented information covers how to use the Portman to LoadImpact converter with version 4.0 of LoadImpact. Version 4.0 is based on the open source load generator, k6.
How to use the Postman to LoadImpact converter
LoadImpact provides a CLI tool for converting Postman collections to k6 tests.
Installation and usage
The following section describes the steps to convert your Postman collections to k6 tests.
First, you have to export your Postman collections.
Install the command-line tool:
npm install -g postman-to-k6
For more installation options see the Github repo.
Run the tool to convert the Postman collection
postman-to-k6 path/to/postman-collection.json -o path/to/k6-script.js
k6-script.jswill be the outputted script name in the specified path of your output.
Make any edits to your script necessary
Utilize your script with your LoadImpact account
k6 run k6-script.jswill execute your script locally with local output
k6 run k6-script.js -o cloudwill execute locally with cloud output to the LoadImpact platform
k6 cloud k6-script.jswill package up the script and any dependencies for execution on LoadImpact’s infrastructure