I have added the plugin Postman to Chrome browser for load testing of my API.
But I am clueless about how to do the load test with Postman tool.
My query is how to simulate "Virtual Users" in this tool?
I have added the plugin Postman to Chrome browser for load testing of my API.
But I am clueless about how to do the load test with Postman tool.
My query is how to simulate "Virtual Users" in this tool?
Postman has a Collection Runner
which can be used for making API calls with multiple iterations.
You might be able to use it for load testing if you can figure out how to get it to run requests in parallel.
It exists a converter to generate a k6 load test from a Postman collection.
https://github.com/apideck-libraries/postman-to-k6
npm install -g @apideck/postman-to-k6
postman-to-k6 collection.json -o k6-script.js
k6 run --vus 100 --duration 3m k6-script.js
For further information, check out the following article Load Testing Your API with Postman
Hi I would suggest That you use Jmeter for load testing it is designed for it. But some people find it easier to use postman as collections are already created in it and it is much more interface friendly.
Step 1- Click on the little arrow along with your collection in the collection listing
Step 2- Then click on the Run button to launch Collection runner
Collection runner is the part which is used for sort of Load testing
Step 3- Collection runner has a lot of important parts to consider for load testing
The screenshot has counts that explains each part
Is the iterations or the number of users
Is the ramp up time or how often the users will hit or come
Is for logging requests
Date selection for what day this test was done
For running the test
All Api collection
All Api listing
Environment selection
After running the required results will show and I have redacted information for privacy
I don't think you'll be able to conduct load testing using Chrome Extension, consider more specialised tools for it, i.e. SoapUI or Apache JMeter
References:
SoapUI is designed for testing web services and load testing is secondary option and JMeter is designed for load testing and doesn't have any web-services specific functionality however if I had to choose I would go for JMeter as it can produce more immense load and has better reporting capabilities.
You can open multiple Collection Runner windows in Postman to run parallel collections.
Click on the Run again and again. You will get new collection window opened. Kick off each collection one by one and they all will start running.
In short, there is no way to perform load test through Postman directly. You can use different tools like Jmeter and SOAP UI etc.
You can't perform load testing with Postman, but you can adapt your test suites implemented in postman collections to load testing tools using the newman utility (which is especially useful in conjunction with the jq program).
The Taurus open source project provided by BlazeMeter might become an option in the future. They do not support multiple instances yet. https://gettaurus.org/docs/Postman/
If you can measure your API performance from the server side and you have a big machine. The Postman Runner in the Postman client can be started multiple times. Set the iteration to a very large number and click start. Then go back to the collection page and open a new Runner page by clicking RUN again. Repeat until your reach your target volume.
Alternatively, you can run the Newman command multiple times using Powershell for example.
# Start 5 newman run of 10 iterations
for($i = 0; $i -lt 5; $i++)
{
Start-Job -Scriptblock {
newman run "./postman_collection.json" --environment "environment.json" --iteration-count 10 --disable-unicode --silent --suppress-exit-code
}
}
# Wait for all to complete
While (Get-Job -State "Running") { Start-Sleep 2 }
# Display output from all jobs
Get-Job | Receive-Job
# Cleanup
Remove-Job *
Great news! There is a way now.
As of today, this feature is only available in the Canary Build but should be available in the productive version soon as well.
Edit: The funciton is now available in the normal version of Postman as well.
To do so:
We can use Postman Collection Runner for load test. Please find below step by step process.
Step1:- Select a Postman Collection or select an environment and click on Run
Step2:- Select the Performance tab under Runner and specify the load settings, click Start
Step3:- Observe the response times and throughput (requests per second) in real time
Step4:- Once the run is completed, observe and identify bottlenecks in response times and requests per second