Search code examples
jmeterjmeter-plugins

Can someone explain me this jmeter test result?


So I recorded a script for the login scenario:

1. url hit is hitting the url

2. login is passing credentials and clicking the login button

This is my jmeter screen Now my url hit is having 55% error rate while the login has 21% only.

Sometimes url hit has 100% error rate whereas login has 0% error rate.

So i want to know what does this mean.? If a user is not able to hit my url then how will they be able to login.? This is something I want to understand.

Error on url hit is shown 504 gateway time-out


Solution

  • How do you know that users are able to log in? JMeter automatically treats HTTP status codes below 400 as successful so even if your login fails and the server returns a "positive" HTTP status code JMeter will automatically treat the request as successful.

    So I would recommend using View Results Tree listener to ensure that your test is doing what it is supposed to be doing and you're really hitting the URL and not getting stuck at the login page.

    Going forward you could use i.e. Response Assertion to ensure that the response contains what it should be containing (for example presence of "welcome" text or presence of "Logout" link) or doesn't contain elements which should not be present (given you're logged in you should not be seeing login form)