For testing web service performance, I used SOAPUI tool, though its name is SOAP, but it also supports the REST service calls. Most of the time I use JMeter to test the performance of particular functionality, and we used SOAPUI for calling SOAP based services, I was always thinking to use it for performance test and this time, I used SOAPUI to test REST services, SOAPUI is simple to configure and to run.
Download it from http://www.soapui.org/Downloads/latest-release.html
Step 1) Create a new REST Project and provide the base URL, I used Node.js to expose one simple rest service for this blog.
Step 2) Under the project, create the New Test Suite (Ctrl + T)
Step 3) Under the Test Suite add new Load Test case (Ctrl + N)
Step 4) Click on the REST Request button, it will prompt for the new Rest Request name, and once you provide the name, it will ask for the URL, provide the complete URL and click OK,
Step 5) it will create a simple REST Request and using UI you can provide the details, like parameters, header details etc.
Step 6) Now, for running the load test, select the Strategy as “Thread”, you can also explore other options like, Simple, Burst and Variance. When you select strategy as thread you can see, option to provide details for, number of virtual users, start threads, end threads and total runs. Total runs has two different parameters to set, one is time and another is number of requests.
If I choose number of requests then Load test will stop once the specifed number of test are ran, if you specify the time, test will continue for that perticular time, so if you want to figure out what is the average resposne time of your request when at a time 10 users are active and 60 requests are made, you can use the thread option
But if you want to figure out how many requests you can serve in 60 seconds if 10 users are active at a time i.e. virtual users,then you can use time option.
The feature I liked most of SOAP UI is, you can define the start treads and end thread parameter, say if you have implemented the caching and you want to have initial load of lesser number and subsequent threads should have more number of users, then you can specify Start Threads to 3 or any minimum number you can think of.
In SOAP UI you can try above example, just import the below XML project file in SOAP UI, and start your any REST server.