Collections:
HTTP Cookie Manager for Web Testing
How to use the HTTP Cookie Manager to help returning cookis received from the Web server?
✍: FYIcenter.com
For most Web applications, the Web server is expecting you to send
back cookies received from the previous HTTP calls.
You can use the HTTP Cookie Manager to help returning cookis received from the Web server automatically as shown in this tutorial.
1. Start JMeter on your computer and open "\fyicenter\Facebook-Login-Test-6.jmx".
2. Right-click on the "Facebook Login Test Plan", and select "Add > Config Element > HTTP Cookie Manager". You see the "HTTP Cookie Manager" settings screen.
3. Set "Clear cookies each iteration" to be checked.
4. Drag and drop the "HTTP Cookie Manager" to move it above the "Login Test Case".
5. Save the test plan as "\fyicenter\Facebook-Login-Test-6.jmx" and run it.
6. View the "POST Login & Password" response data in a Web browser, you see an error on the returning page: "The password you’ve entered is incorrect." This is expected, because the user email address and password provided were wrong.
7. Add an Response Assertion for the "POST Login & Password" sampler with the following settings:
Name: Incoorect Password Apply to: Main sample and sub-samples Field to Test: Text Response Pattern Matching Rules: Contains Patterns to Test: The password you\\u2019ve entered is incorrect.
8. Save the test plan and run it again. This time, "POST Login & Password" will pass the assertion.
The picture below shows you how to use the HTTP Cookie Manager to help Web tests:
Â
⇒ View Result in Table for Entire Test Plan
⇠POST Request to Send User and Password
⇑ Testing Web Application with JMeter
⇑⇑ Apache JMeter Tutorials
2017-11-18, 2877👍, 0💬
Popular Posts:
How to generate test fractional numbers? Test fractional numbers are numbers with fractions that are...
How to call JMeter command in a Windows batch file? I want to create a single batch job to run JMete...
What are JMeter command line options? You can get see JMeter command line options by running this co...
How to access Response Status Code 400 as Success? My sampler failed, because the server returns the...
What are JMeter command line options? You can get see JMeter command line options by running this co...