On 16 December 2010 16:35, Damien Tougas <[email protected]> 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.

> Thanks!
>
> --
> Damien Tougas
> Programmer/Analyst
> Internet Software Services
> Bates College
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to