You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by nlunebur <nl...@lisasoft.com> on 2004/08/10 06:59:59 UTC

Re: how to store value in Response Assertion (regex example)

regex example ...

hi again! just posting the solution to my own issue, thanks to my work 
colleague!

now i have this:

Thread Group
    request1
    request2


request1 parameters being:
                   name = somename1
                   value = somevalue1

and request2 parameters being:
                   name = somename1
                   value = 
${__regexFunction("*BLAH*",myRequest,ALL,,somevalue1,)}

so now if request1's response contained anything with 'BLAH' in it, it 
will replace the value parameter with 'myRequest', otherwise it will
just send the 'somevalue1' in the request (as the default).

Amen!!! Hope this helps others out there who got frustrated with regex 
as i did! lol

nicole

nlunebur wrote:

> hi all!
>
> i want to be able to do something like the following in my test:
>
> Response Assertion (does NOT contain BLAH)
> Thread Group
>    request1
>    If(response assertion contains 'BLAH')
>                myRequest
>    request2
>
> so i want to run this test where if request1 ever gets a response with 
> 'BLAH' in it, i want to send myRequest, otherwise not.
>
> i thought i would try to store the value 'BLAH' in my Response 
> Assertion where i can refer to it in my If Controller.
> eg. If(${response}='blah'), go ahead.
>
> can i do this? or is there some other way i can do this?
> i've looked at the regexFunction thinking i could use it for storing 
> the value, it is so confusing, as Rita Danger previously mentioned! i 
> cannot find some simple example anywhere :(
>
> can anyone help??
>
> thanks!
> nicole
>
> ---------------------------------------------------------------------
> 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