Pre-Defined Beanshell Variables in JMeter
The most essential and commonly used JMeter API classes available to BeanShell components are listed in the following section. Let's deep down pre-defined beanshell variables in JMeter and more... The following is found at the bottom of the BeanShell sampler component: For the script, the following variables are defined: "SampleResult, ResponseCode, ResponseMessage, IsSuccess, Label, FileName, ctx, vars, props, log” Sample Result It corresponds to the org.apache.jmeter.samplers class in JMeter. All of the javadoc's fields and methods may be accessed and invoked. Here's an example of a scenario: getUrlAsString currentURL = SampleResult.getUrlAsString currentURL = SampleResult.getUrlAsString current () ResponseCode The [...]