Using JMeter for load testing REST service

I had this REST service that i wanted to load test, but my REST service takes dynamic data so i decided to use Apache JMeter for load testing and these the steps that i followed. If you want to download the Apache JMeter test you can download it from here My REST service allows me to add a new Contact, for that it takes firstName, lastName and email id as parameters, i wanted to generate different values for example first contact should be [firstName-1,lastName-1,email] and then the second contact should be [firstName-2,lastName-2,email],.. etc. I followed these steps
  1. First create a Thread Group with 1 thread like this
    This means run all your tests in single thread and execute the test only once.
  2. Next create a Loop Counter which is like for statement which says run the statements 10 times
  3. Inside the loop, you want to get the current loop count in a variable so you can create a counter variable, you can say that create a counter that starts from either 1-10 or 10-20,.. you can define name of the counter variable, in my case it is contactId
  4. Next comes the actual HTTP request, in my case my REST service is listening at http://localhost:8080//ManageContact/rest/contact and i want to make HTTP GET request to this URL with 3 form variables, firstName, lastName and email. I wanted to generate the form field values dynamically with the counter variable in it
  5. The last element in the test is Summary Report which is used for collecting the summary of the load test. After running the test i can see the testing results in the Summary Report like this

1 comment:

  1. Hello,
    The Article on Using JMeter for load testing REST service, gives detailed information about it. Thanks for Sharing the information about Load Testing. For More information check the detail on the load testing here Software Testing Services

    ReplyDelete