I'm trying to write performance test.
In a step #1 I'm visiting url: https://example.com/login?redirect_to=http://somesite.com
This url redirects me back to http://somesite.com?ticket=afsgdfasdfasg
In my JMeter script I need to extract ticket
parameter and reuse it in a further logic.
Could you please tell me how it can be achieved ?
When you check Redirect Automatically option, JMeter will not consider redirect as separate HTTP request. This in turn may result as lower response time in your overall performance test. Whereas Follow Redirect option will consider each redirection as separate requests.
Follow Redirects (checkbox). Uncheck these two check boxes to disable the redirects. You can then include a separate HTTP sampler to perform the redirects if you want by checking the status of the previous request. I face this situation in my projects and this is the technique I use to control redirects.
Step 5: Under 'Response Data' tab, click 'Response Header' or 'Response Body' tab (wherever dynamic value is present).
That would look like this:
Further reference this variable as ${ticket}
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With