HomeSUPPORT QUESTIONS

Need help with StresStimulus? Start here.

Multiple Cookie Appending to subsequent request Messages in this topic - RSS

Sundara J
Sundara J
Posts: 11


1/11/2013
Sundara J
Sundara J
Posts: 11
Hi All,
Wondering if anyone knows the way to do this ..
1. I have a request1 which throws back a cookie1 and i set it to extractor with a name1
2. I have a request2 which throws back a cookie2 and i set it to extractor with a name2
below in the header replace window for request3(Cookie)
{{cookie1,cookie2}}
{{cookie1}},{{cookie2}}
{{cookie1}};{{cookie2}}
Anyone know whats the right syntax to add both cookies from step 1 and 2 to request 3?

0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


1/11/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
 Hi Sundara,
 
The 1-st line will not work, as each cookie must be surrounded by "double curly brackets"
The 2-nd  line should use ";"  to separate cookies
The 3-rd choice  {{cookie1}};{{cookie2}}   is correct
 
However, in most cases it is unnecessary to  parameterize cookies. StresStimulus automatically correlates the cookies from the replayed response to the subsequent requests. For example, let say you record a test case and during recording the server assigned a session cookie to the recorded session. Then when you replay the test case the server will assign a different session cookie. During replay, StresStimulus will automatically send the new session cookie with all the requests, instead of the recorded one.  This feature is called auto-correlation
 
So before parameterizing,  I recommend to check if the test works without it.

Does this make sense?
-Vadim
0 link
Sundara J
Sundara J
Posts: 11


1/11/2013
Sundara J
Sundara J
Posts: 11
sounds good. the reason i started into parametrization of cookies,  was getting cookie expired messages on the server logs and figured cookie being sent was expired. Does any setting need to be toggled for auto-correlation to work ? Will give it a go thanks.

-Sundara 
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


1/12/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
Sundara,
Auto-correlation works automatically.
It looks like during replaying your test case, StresStimulus used expired cookies. This is an indication that auto-correlation did not work. This can happen when your test case missing initial sessions where the cookies were set by the server for the first time.
To double check that your test case is complete, re-record it and make sure that all initial requests are captured.
If this will not help, we can set up a web support session to troubleshoot your test case.  Please let me know, and I will send you a link, where you would be able to schedule our WebEx support session at convenient time.

-Vadim
0 link
Sundara J
Sundara J
Posts: 11


1/14/2013
Sundara J
Sundara J
Posts: 11
can you let me know about the webex pl ?
thx
-Sundara
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


1/14/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
Hi Sundara,
 I just sent you a  private message with a support session scheduling link.
Cheers,
-Vadim
0 link
Sundara J
Sundara J
Posts: 11


1/30/2013
Sundara J
Sundara J
Posts: 11
Hi Vadim ,
After our session the other day I am still running into the issue. a freshly recorded script will work for a day  and then will start failing the next day .. I also sent a request to 'support@stimulustechnology.com' on the same.
I was able to trackdown the reason to a security token that needs to be passed from a prior request to a subsequent request .. However am unclear on how to do this thru stress stimulus.
Attached a screen shot below note that the circled payload needs to be extracted from before request
 
Microsoft.IdentityModel.Tokens.SecurityTokenExpiredException: ID4223: The SamlSecurityToken is rejected because the SamlAssertion.NotOnOrAfter condition is not satisfied. NotOnOrAfter: '1/29/2013 3:51:50 PM' Current time: '1/30/2013 6:33:41 PM'


0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


1/31/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
Hi Sundara,
There is a possibility that your server application denies request with expired parameters, so using dynamic parameters instead of recorded values very well may fix it.
Generally, to parameterize a parameter (a security token, in this case) you need to create a corresponding extractor in the previous response, and then parameterize the parameter in the request by replacing the recorded value with the extractor.
In the screenshot, you circled multiple name / value pairs, so I’m not sure if you want to parameterize all of them, or some of them, so I’ll give a general direction.
To learn how to create an extractors check this post http://www.stresstimulus.com/blog/post/v2-5-update-3
Then, to create a body parameter:

  1. Select Parameter or Navigation Tree.

  2. Select the request on Test Case Tree.

  3. Select the Body tab.

  4. Click in the “Replace with” cell on  the parameter row. Parameterization Control will appear. Expand the Extractors node and select the extractor that you created.


 Depending on your request type, the “Body” tab may look differently, but the concept is the same.
Does this make sense?
Cheers,
-Vadim
0 link
Sundara J
Sundara J
Posts: 11


1/31/2013
Sundara J
Sundara J
Posts: 11
thanks much that worked ..
0 link
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583


1/31/2013
Vadim @StresStimulus
Vadim @StresStimulus
Administrator
Posts: 583
You're welcome, Sundara.
-Vadim
0 link






Copyright © 2024 Stimulus Technology