You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by rkedari <rk...@msas.in> on 2011/01/29 14:01:29 UTC
How to pass response assertion result to other controller
HI,
How to control execution of a sampler setting criteria like if the assertion
in other sampler is passed then only execute it.
I want do some requests using "once only controller" having response
assertion in it and want to run other "simple controller" only if the
assertion in the first controller is passed.
regards,
rkedari
--
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-pass-response-assertion-result-to-other-controller-tp3362639p3362639.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: How to pass response assertion result to other controller
Posted by rkedari <rk...@msas.in>.
Hi,
I have tried with ${JMeterThread.last_sample_ok} but as you have mentioned
it after all the samples executed, so i can not user assertion.
I was able to do it with "Regular Expression Extractor" added to in once
only controller with regex some thing like "<input type="hidden"
value="(.+?)">" and set a reference variable value dependent on the request
response data, then added samples in IF controller where the reference
variable is used to run the samples, that will be executed depending on the
previous samples response
regards,
rkedari
--
View this message in context: http://jmeter.512774.n5.nabble.com/How-to-pass-response-assertion-result-to-other-controller-tp3362639p3371384.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: How to pass response assertion result to other controller
Posted by sebb <se...@gmail.com>.
On 29 January 2011 22:22, Deepak Shetty <sh...@gmail.com> wrote:
> Hi
> After the sampler with the assertion executes use
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html
> ${JMeterThread.last_sample_ok} to check the value (you have to use this
> immediately (so if you need it later use it to set a variable or something
> immediately). Note that this checks whether a particular sampler succeeded
> or failed, it doesnt check a particular assertion. If you need that
> functionality there a thread in the mail archive that has some sample java
> code that shows you how to do this
Note that last_sample_ok is updated after all PostProcessors and
Assertions have run, but before the Listeners.
So you cannot use a PostProcessor to save the value.
The variable will not be updated again until after the next sample and
its assertions (if any) has run, so there's no need to save it unless
you wish to affect the behaviour for samples after the next one.
> regards
> deepak
>
>
> On Sat, Jan 29, 2011 at 5:01 AM, rkedari <rk...@msas.in> wrote:
>
>>
>> HI,
>>
>> How to control execution of a sampler setting criteria like if the
>> assertion
>> in other sampler is passed then only execute it.
>>
>> I want do some requests using "once only controller" having response
>> assertion in it and want to run other "simple controller" only if the
>> assertion in the first controller is passed.
>>
>> regards,
>> rkedari
>>
>> --
>> View this message in context:
>> http://jmeter.512774.n5.nabble.com/How-to-pass-response-assertion-result-to-other-controller-tp3362639p3362639.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: How to pass response assertion result to other controller
Posted by Deepak Shetty <sh...@gmail.com>.
Hi
After the sampler with the assertion executes use
http://jakarta.apache.org/jmeter/usermanual/component_reference.html
${JMeterThread.last_sample_ok} to check the value (you have to use this
immediately (so if you need it later use it to set a variable or something
immediately). Note that this checks whether a particular sampler succeeded
or failed, it doesnt check a particular assertion. If you need that
functionality there a thread in the mail archive that has some sample java
code that shows you how to do this
regards
deepak
On Sat, Jan 29, 2011 at 5:01 AM, rkedari <rk...@msas.in> wrote:
>
> HI,
>
> How to control execution of a sampler setting criteria like if the
> assertion
> in other sampler is passed then only execute it.
>
> I want do some requests using "once only controller" having response
> assertion in it and want to run other "simple controller" only if the
> assertion in the first controller is passed.
>
> regards,
> rkedari
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/How-to-pass-response-assertion-result-to-other-controller-tp3362639p3362639.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>