Reputation: 659
How can I test server performance to be exact an API?
Let's say this API: https://test.com/new_task
. It's a POST request and requires certain data in body
. Now how can I test this and know the server maximum capacity (number of requests simultaneously)?
I tried searching in the Postman UI, but I didn't find any option for this purpose. Is there any software or application specifically developed for this purpose?
Upvotes: 1
Views: 2763
Reputation: 2263
An easy solution for API load testing is to use SoapUI (or ReadyAPI if you have a license):
In SoapUI 5.6 I was able to use hundreds of threads. If you need more (500+, thousands or more) your computer's performance might be the limit. In that case JMeter could be a good option.
More on load testing is in SoapUI documentation.
Upvotes: 0
Reputation: 29619
DmitriT's answer is the one I'd go with.
However, I would add that "maximum capacity" is not entirely black and white, and you probably want to look at the resource utilization on the server, and at the response times you see in your JMeter tests.
Specifically, there's a difference between "the server is slow, but responding", "the server is unacceptably slow, but responding" and "the server is not responding". There's also an uneven distribution of response times.
I'd recommend to agree on an acceptable response time (e.g., 1 second), and use JMeter's "90th percentile" measurement to see at what level of load you breach that response time. That's the point at which your server is practically at its maximum capacity, even if it's still responding.
Upvotes: 1
Reputation: 168002
Postman cannot send requests in parallel, maximum you can achieve with it is running your request/collection sequentially for specified number of iterations.
You can consider switching to i.e. SoapUI which has some load testing capabilities (rather limited though)
The best option would be converting your Postman request (or collection) into a load testing tool test plan, for example Apache JMeter is quite powerful.
In order to convert your Postman request (or collection) into a JMeter test plan:
Launch JMeter's HTTP(S) Test Script Recorder
If your request uses HTTPS protocol - import JMeter's self-signed certificate into Postman
Run your request (or collection) in Postman
JMeter will capture the request(s) and create relevant HTTP Request sampler and HTTP Header Manager
Once done you can increase the number of threads (virtual users) in Thread Group and run your request in parallel.
More information: How to Convert Your Postman API Tests to JMeter for Scaling
Upvotes: 2