What could be a reson for getting JMeter Response: 500 this page has been expired?

0

I have recorded a simple script for login-logout into an application using a browser. I checked the recorded script and everything looks good, it recorded login in, homepage and logout.

However, when I reply it back, I have got a response message for the login request says:"500This page has been expired Possible reasons, 1. Opened too many browser windows (or closed using the X button instead of button). 2. Session with Cassiopae has expired. Suggestion: Please close all Cassiopae windows and re-login. Currently the following screens are open None."

I checked the cookies and ids and been handled correctly using JMeter HTTP Cookie Manager. What possible other reasons could be leading to this failure.

Thanks for any help

Nawar Youssef

Posted 2019-07-12T18:17:21.373

Reputation: 3

Have you checked what it says in the error message? – DavidPostill – 2019-07-12T19:44:21.570

I did get an error message. The request was passed (with Response Code: 200 and Response Message: OK). The above message was the only thing I have got from Response data->Response Body section in View Result Tree. Is there a way to get a read error message? How? Thanks – Nawar Youssef – 2019-07-12T20:02:54.723

I meant the stuff it suggested in the response message in the question. – DavidPostill – 2019-07-12T20:16:51.313

Yes, I checked them. For number 1: the X red button on the upper right of the window is the only way to close it after finish. Also, the last sentence in the message doesn't make sense to me, any explanation? – Nawar Youssef – 2019-07-12T22:02:02.807

You likely have unhandled dynamic data in your request that needs buttoning up – James Pulley – 2019-07-17T18:58:03.600

Answers

0

In the absolute majority of cases you cannot just record and replay the test using JMeter's HTTP(S) Test Script Recorder modern web applications widely using dynamic parameters for i.e. client-side state tracking or security reasons

My expectation is that you're passing a recorded hard-coded value when your application under test expects it to be dynamic.

  1. Make sure to add HTTP Cookie Manager to your test plan, if your application maintains user sessions based on cookies - it should be enough to handle it.
  2. Although point 1 is a must, it might be not enough in case if dynamic parameter doesn't belong to cookies. In this case you will have to perform manual correlation to wit:

    • identify dynamic request parameters
    • extract them from the previous response using a suitable JMeter PostProcessor and store them into JMeter Variables
    • replace recorded hard-coded values with the variables from the previous step.

Dmitri T

Posted 2019-07-12T18:17:21.373

Reputation: 411

Yes I already did what you have suggested. However, I got a _flowExecutionKey that I think need to be correlated, but I couldn't find the source of this key (where I should extract it from) Are _flowExecutionKeys usually need to be correlated? – Nawar Youssef – 2019-07-15T17:45:07.607

Update: I was able to find and extract _flowExecutionKey, afrRedirect and _afrLoop tokens. Now working on token called "session" which is different than "JSessionID". Value of this token is not found in any of the response data I get when replaying the script. Someone suggested that could because I need a permission from developers to use JMeter to test in the development environment! Any thoughts about this? – Nawar Youssef – 2019-07-25T23:41:47.653