jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: JSR223 Sampler
Date Thu, 16 Dec 2010 20:02:52 GMT
On 16 December 2010 17:42, sebb <> wrote:
> On 16 December 2010 16:35, Damien Tougas <> wrote:
>> Hello,
>> The documentation for the JSR223 Sampler indicates that there should be a
>> variable set called SampleResult where I can set the response data, success,
>> code, etc.
>> In reality, there does not appear to be any such variable set.
> That is supposed to be set, but seems to have been forgotten ...
>> Instead there
>> is a variable set called "sampler" (which is not mentioned in the
>> documentation) that is an instance of JSR223Sampler. There does not seem to
>> be any way to get to the SampleResult from the sampler variable.
>> The UI also says that there is a variable called "prev" (not mentioned in
>> the documentation either), and I am not exactly sure what that is for.
> "prev" is the previous SampleResult, which is intended for use by the
> JSR223 elements that run after the sampler - i.e. Post-Processor,
> Assertion, Listener.
> It does not apply to the Sampler; it seems the UI is also wrong here.
>> Can someone shed some light on how I should access the sample result in my
>> script?
> Does not appear to be possible currently unfortunately, though any
> return data will saved as the responseData, and the rest of the fields
> will be set up automatically. So it is possible to create samples.
> If you are using BeanShell as the language, just use the BeanShell
> Sampler instead.
> As a work-round until this is fixed, you could create the sample using
> the JSR223 Sampler, and then manipulate it further using a child
> JSR223 PostProcessor.

I've done a tidyup of the BSF/JSR223 test elements to ensure they
support the same variables, and to add the SampleResult variable to
the JSR223 Sampler (it was present in the BSF Sampler). UI and
documentation has also been updated.

These changes are in nightly builds from r1050123.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message