You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by gubbu gubbu <gu...@yahoo.com> on 2010/10/30 06:21:05 UTC

What assertion to use Validate Set:Cookie:JSESSIONID valuein response header

I am sending requests as follows 
http://host/context-patch/abcd.jsp;4AADDA33814B25F63C1D11F1901DF50F.host1jvm1
http://host/context-patch/abcd.jsp;4AADDA33814B25F63C1D11F1901DF50F.host3jvm3
etc 
Now if I check the View Results Tree-Sample result under the Response Headers I 
see 
Set-Cookie: JSESSIONIS=4AADDA33814B25F63C1D11F1901DF50F.host1jvm1; Path=/; 
Secure

Which is great . I really dont care about the first part of JSESSIONID but I 
want to make sure that the request landed on the jvm I wanted to by comparing 
the "host1jvm1" to its result part and making sure I got back "host1jvm1" 

Is the response assertion the right one to check the Set Cookie header ? If so I 
need some help as I couldnt figure out how to do it even after reading 
the http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Response_Assertion


thanks in advance
Tony


      

Re: What assertion to use Validate Set:Cookie:JSESSIONID valuein response header

Posted by sebb <se...@gmail.com>.
On 30 October 2010 05:21, gubbu gubbu <gu...@yahoo.com> wrote:
> I am sending requests as follows
> http://host/context-patch/abcd.jsp;4AADDA33814B25F63C1D11F1901DF50F.host1jvm1
> http://host/context-patch/abcd.jsp;4AADDA33814B25F63C1D11F1901DF50F.host3jvm3
> etc
> Now if I check the View Results Tree-Sample result under the Response Headers I
> see
> Set-Cookie: JSESSIONIS=4AADDA33814B25F63C1D11F1901DF50F.host1jvm1; Path=/;
> Secure
>
> Which is great . I really dont care about the first part of JSESSIONID but I
> want to make sure that the request landed on the jvm I wanted to by comparing
> the "host1jvm1" to its result part and making sure I got back "host1jvm1"
>
> Is the response assertion the right one to check the Set Cookie header ? If so I

Yes, that's probably the simplest method.

> need some help as I couldnt figure out how to do it even after reading
> the http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Response_Assertion

What did you try?

What happened?

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


Re: Setting up Response Assertion for Cookie

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
there is a radio button on Response Field to test titled "Response Headers"

You can use a regex match using matches and a regular expression like

Set-Cookie:\s*JSESSIONID=[^.]*\.${host1jvm1}; (Untested regex , please
verify)

assuming that the value you have is in a variable called host1jvm1

regards
deepak

On Mon, Nov 1, 2010 at 9:52 PM, gubbu gubbu <gu...@yahoo.com> wrote:

> I read the docs but couldnt find any example . How can I setup a response
> assertion for "response headers" ? For example I want to compare the
> "host1jvm1"following header to the request .
>
> Set-Cookie: JSESSIONID=4AADDA33814B25F63C1D11F1901DF50F.host1jvm1; Path=/;
> Secure
>
>
>
>

Setting up Response Assertion for Cookie

Posted by gubbu gubbu <gu...@yahoo.com>.
I read the docs but couldnt find any example . How can I setup a response 
assertion for "response headers" ? For example I want to compare the 
"host1jvm1"following header to the request .

Set-Cookie: JSESSIONID=4AADDA33814B25F63C1D11F1901DF50F.host1jvm1; Path=/; 
Secure