You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Glenn Caccia <ga...@yahoo.com.INVALID> on 2015/04/24 21:35:57 UTC

documentation for sampler object in scripts

 I want to potentially interact with the "sampler" object that is available when working with script processors like the JSR223 PostProcessor.  In the script section of the post processor, it shows available variables to be: ctx vars props prev sampler log Label Filename Parameters args[] OUT.
If there any documentation on each of these and how to interact with it?  I'm familiar with vars and props, but not with the others.  For "prev sampler", is this one object of "prev sampler" or two objects of "prev" and "sampler"?  Basically, I have an HTTP sampler and I want the post processor script to be able to work with the return from the sampler.  Can that be done?
Thanks,
Glenn

Re: documentation for sampler object in scripts

Posted by chaitanya bhatt <bh...@gmail.com>.
Yes. You can play around with the response of a sampler.

Check the JavaDoc:
https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html

Here is an example of how can extract and/or modify the sampler's result:

http://stackoverflow.com/questions/9785777/jmeter-how-to-not-fail-500-internal-server-errors

<http://stackoverflow.com/questions/9785777/jmeter-how-to-not-fail-500-internal-server-errors>
Thanks
Chaitanya M Bhatt
http://www.performancecompetence.com


On Fri, Apr 24, 2015 at 12:35 PM, Glenn Caccia <ga...@yahoo.com.invalid>
wrote:

>  I want to potentially interact with the "sampler" object that is
> available when working with script processors like the JSR223
> PostProcessor.  In the script section of the post processor, it shows
> available variables to be: ctx vars props prev sampler log Label Filename
> Parameters args[] OUT.
> If there any documentation on each of these and how to interact with it?
> I'm familiar with vars and props, but not with the others.  For "prev
> sampler", is this one object of "prev sampler" or two objects of "prev" and
> "sampler"?  Basically, I have an HTTP sampler and I want the post processor
> script to be able to work with the return from the sampler.  Can that be
> done?
> Thanks,
> Glenn

RE: documentation for sampler object in scripts

Posted by Erez Naim <er...@theneura.com>.
Check this out:
https://jmeter.apache.org/api/org/apache/jmeter/samplers/SampleResult.html

--Erez--

-----Original Message-----
From: Glenn Caccia [mailto:gacaccia@yahoo.com.INVALID] 
Sent: Friday, April 24, 2015 10:36 PM
To: JMeter Users List
Subject: documentation for sampler object in scripts

 I want to potentially interact with the "sampler" object that is available when working with script processors like the JSR223 PostProcessor.  In the script section of the post processor, it shows available variables to be: ctx vars props prev sampler log Label Filename Parameters args[] OUT.
If there any documentation on each of these and how to interact with it?  I'm familiar with vars and props, but not with the others.  For "prev sampler", is this one object of "prev sampler" or two objects of "prev" and "sampler"?  Basically, I have an HTTP sampler and I want the post processor script to be able to work with the return from the sampler.  Can that be done?
Thanks,
Glenn


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org