- 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.
- Next create a Loop Counter which is like
forstatement which says run the statements 10 times - 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 - 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
- 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
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
Subscribe to:
Post Comments (Atom)





No comments:
Post a Comment