e.g header: ARPT=YMXXXKS192.168.100.218CKQIY; path=/,JSESSIONID=3F523783B77C8E8EDEE5F5FE5B8FE99A; Path=/ I just want to grab JSESSIONID and value.
-----------------------------------------------------------------------------------------------
Code Snippet
using System.Net;
public class ExtractJSESSIONID : WebTestRequestPlugin
{
public override void PostRequest(object sender, PostRequestEventArgs e)
{
foreach (Cookie cook in e.Response.Cookies)
{
if (cook.ToString().StartsWith("JSESSIONID="))
{
e.WebTest.Context.Add("JSESSIONID", cook.Value.ToString());
}
}
}
}
The contents of this blog were gathered from the blogger real life experiences and from the different forums related to automated test.
Subscribe to:
Post Comments (Atom)
Unix/Linux Commands
Flow control Syntax break Exit a loop. continue Exit the current iteration of the loop and proceed with the next iteration. Ctrl+C Key com...
-
%systemroot%\system32\inetsrv\config\applicationHost.config https://docs.microsoft.com/en-us/iis/configuration/system.applicationhos...
-
hi everybody, i am doing load test for 10 users,20users,30users working fine upto to this point if increase to 40 users iam getting error a...
No comments:
Post a Comment