![apache jmeter rest api load testing apache jmeter rest api load testing](https://champsoftblog.com/wp-content/uploads/2020/12/2-1024x444.png)
By the way, don’t forget to disable Debug Sampler when scaling your load test.Īfter completing the test plan you are ready to run this script as you would with any JMeter script using Redline13 or local testing.
Apache jmeter rest api load testing how to#
We have shown how to use Debug Sampler for inspecting our variables in the test execution. In our example, we have covered how to do JMeter Load Testing with a JSON payload for API testing and extract JSON data from the response. Debug Sampler should then be disabled from the test plan because of the impact it can have on the load agent.Īfter executing the test again we are able to extract the data variable thanks to the Debug Sampler. However, it is not recommended when executing a heavy testing load. It’s a very useful Sampler for debugging and should be included in all JMeter scripts when developing the test plan. We are adding Debug Sampler to be able to inspect our variable.
![apache jmeter rest api load testing apache jmeter rest api load testing](https://rharshad.com/assets/img/2020/04/jmeter-dashboard-stats.png)
It is easy to extract the data from the response using JSON Extractor Post Processors.Īfter adding the JSON Extractor, we need to set in the configuration the specific data we want to extract.
![apache jmeter rest api load testing apache jmeter rest api load testing](https://champsoftblog.com/wp-content/uploads/2020/12/17-768x525.png)
In our example we are trying to fetch alarm information from the IOT system rest service.Īfter executing our test we will get the response to our request from the server below. We then put the JSON payload into the Body Data section of our HTTP Request Sampler. First, we need to add HTTP Header Manager into our HTTP Request in order to set Content-Type as application/json. To perform sending the JSON payload we need a different configuration. This post will show how to do JMeter Load Testing with a JSON payload. Currently, the most popular approach for API testing is to send a JSON payload file instead of using data with parameters.