I have a Jmeter script ready for checking performance of webapp, Before i send the actual http request to measure performance, i want to send another http request to set some value. How do set the http request to set some values in Jmeter?


Normally people use setUp Thread Group for any precondition actions.

If for some reason this is not applicable for your scenario - you can consider using JSR223 PreProcessor and Apache HttpComponents API to send a custom HTTP Request prior to the JMeter's one. The time taken by PreProcessors, PostProcessors and Timers is not included into the sampler's "Elapsed Time".

See How to Load Test AJAX/XHR Enabled Sites With JMeter for some reference Groovy code, but keep in mind you need PreProcessor, not the PostProcessor.

Not the answer you're looking for? Browse other questions tagged or ask your own question.