Someone please help me how to do scripting using jsr223
preprocessor in Jmeter
with some examples
.
Any best site to get tutorial
for the same.
Thanks in advance
SIJO
For instance:
google.com
into "Server Name or IP"Add JSR223 PreProcessor as a child of the HTTP Request and put the following line into "Script" area:
sampler.setDomain("example.com");
example.com
instead of google.com
google.com
via View Results Tree listener. So the purpose of PreProcessors is do something before request in order to make the system prepared for the request or change request somehow (for instance you have dynamic number of parameters or dynamic number of files to send with the request and don't want to hardcode it).
In above example sampler
stands for HTTPSamplerProxy, see JavaDoc for available methods and fields. Also check out Beanshell vs JSR223 vs Java JMeter Scripting: The Performance-Off You've Been Waiting For! guide for details on groovy engine installation and scripting best practices.