Using script languages within test plans
JSR223 PostProcessor allows you to use precompiled scripts within test plans. The fact that the scripts are compiled before they are actually used brings a significant performance boost compared to their inline counter parts. This also allows a variety of scripting languages to be used including Java, groovy, beanshell, jexl, and so on, allowing us to harness the powerful language features in those languages within our test plan.
JSR223 components could, for example, help us tackle preprocessor or postprocessor elements, samplers, or completed or logical loops within our test plans, allowing us to have more control over how elements are extracted from responses and stored as JMeter variables.
How to do it…
In this recipe, we will see how to use a JSR223 postprocessor within our test plan. We have chosen groovy (http://groovy.codehaus.org/) as our choice of scripting language, but any of the other supporting languages will do. Perform the following steps...