Search code examples
jmeteraccess-tokenload-testingauth0bearer-token

Load testing application using jmeter


I am load testing a web application. I am new to JMeter and have too many confusions.

  1. I try to access the website link using JMeter, but the application login is handled by a third party(Auth0) and I am not able to find a way how I can successfully access the application with proper authorization.

Is it possible to give the access token somewhere in the Jmeter, so I can skip the redirecting to Auth0 page for logging in and entering username and password

If so how can I do it

  1. Also, even if I access the website pages without username and password, still Jmeter returns a status code 200.

Even if I access the application successfully still the status code will be the same.

How do I differentiate if Jmeter is successfully opening the link I passed or is stuck at the login page to which it is redirected to.

  1. Is there a way to interpret the response body, like what page is Jmeter seeing now,

I have been trying to a find a way for so long now, so any help will be greatly appreciated


Solution

  • 1/ Yes, use HTTP Header Manager and set the token here. Or if it's a parameter set it in HTTP Request parameters table

    2/ JMeter marks a sampler in error if return code is >=400. So if response code is 200 but page is not expected one, you need to use Response Assertion to test presence of a particular content

    3/ Yes, in View Results Tree either use in the select box in the middle on the left the renderers HTML with embedded resources or Browser