Postman, the popular tool used for building, testing, and delivering API’s, is now compatible with RedLine13 to run a Postman load test. We’ve integrated Postman as a means to run any Postman collection inside RedLine13 as a performance test. The project is available on github.
Postman Collections
In Postman, a collection is used to allow you to bundle many different requests into one group. Collections are a great way to organize requests so that they “accurately mirror your API”. Postman users also have the ability to add metadata to requests, store sample responses, filter through requests, and more. Postman collections are great ways to manage and organize your API’s and all of their requests, and now you can test those collections on RedLine13 as collections can be downloaded as a JSON file.
Postman Load Test with RedLine13 – Postman Integration
Postman collections are easy to run on RedLine13 now. It all starts by modifying a custom load test.
Step 1: Export Postman Collection
- To get started, we first need to export a collection from Postman
- Navigate to the collection that you want to test, click the three dots to expand the menu, and then hit “Export”
- You will then be prompted to select Collection v1 or Collection v2, choose which one works best for you
- Export your collection to your file directory of choice
Step 2: Clone Our Example Project To Your Local Environment
- Clone the repository locally
-
git clone https://github.com/redline13/plugin-postman.git cd plugin-postman
-
- Modify CustomTest.js in the constuctor to override the defaults. These options are the API options defined in newman
- this.newmanCollection = ‘./Echo.postman_collection’;
- Specify the collection file that you will be attaching to the test. The file will be in the same directory which test is run from, use ./COLLECTION
- this.newmanEnvironment = null;
- Specify environment file (or url to environment file)
- this.newmanGlobals = null;
- Postman Global Variables can be optionally passed on to a collection run in form of path to a file or URL.
- this.newmanIterations = 1;
- Specify the number of iterations to run on the collection.
- this.newmanCollection = ‘./Echo.postman_collection’;
Step 3: Package Your Test
- We require the package.json which is provided and includes newman. For this reason we need to package our test run.
-
tar cvf postman.tar CustomTest.js Echo.postman_collection package.json
-
- Include your test(CustomTest.js), collection(Postman collection), package.json
Step 4: Run Your Test
- Login to https://www.redline13.com/Service,
- RedLine13 enables load tests on your cloud, you need to first setup AWS Keys.
- This test requires the NVM plugin, add to your account: RedLine13 Plugin Manager
- Add the plugin by hitting the “+”
- Navigate back to home, click “Start Test” then select “Custom test”
- Click “Upload Custom” and select the .tar we packaged earlier
- Select # of users to simulate
- Required: Advanced Custom Test Options
- Select plugin “Node Version Manager”
- Select 6.* as the node version
- Note: the Load Agent Language should have changed to Node.js
- Select plugin “Node Version Manager”
- Optional: Modify Advanced Cloud Options to control the number and location of servers.
Once completed, review your parameters, then name and run your Postman load test. The servers will spin up and display your data in real-time. From there, you can view your results as needed.
For more, visit the Postman Plugin GitHub Page.