Collections:
Pass Seesion ID to Subsequent HTTP Requests
How to Pass Seesion ID to Subsequent HTTP Requests query string parameters?
✍: FYIcenter.com
If your Web application uses cookie to manage session ID,
you should have no problem to run the test plan recorded by the JMeter proxy server.
However, if your Web application uses query string parameter to manage session ID, running the test plan recorded by JMeter will fail. Because the recorded test plan does not dynamically change the session ID.
You need to follow steps below to make your session ID as a dynamic paremeter.
1. Run JMeter and open "Login-Logout-Session-2.jmx".
2. Run the test plan again and open the "View Results Tree".
3. Review the response message of the "/login.php" request or the redirected "/home.php" request. You should see the session ID value.
4. Add a "Regular Expression Extractor" post processors to capture the session ID value in a variable: "SessionID".
5. Update subsequent HTTP requests to use the "SessionID" variable.
6. Save the test plan as "Login-Logout-Session-3.jmx".
Your test plan should be able to run correctly now.
Â
⇠Revise Recorded Session in JMeter
⇑ Recording with JMeter HTTP Proxy
⇑⇑ Apache JMeter Tutorials
2018-07-18, 3308👍, 0💬
Popular Posts:
How to generate email addresses? To help you to obtain some email addresses for testing purpose, FYI...
How to generate currency test values? Currency test values are frequently needed in testing date and...
How to use HTTP protocol to post an XML message to a server? You can follow this tutorial to post an...
How to validate and decode MAC (Media Access Control) addresses? In order to help your programming o...
Where to find tutorials on Test Management? I want to know how to manage software testing documents ...