I am trying to login into a web application in Jmeter using Username and Password. In HTTP request, Username and Password are sent as parameters. Whether I provide correct Username/Password or incorrect Username/Password, the status is Success.But when I add Response Assertion, the status is Warning. So Please provide me some suggestions to rectify this problem.
1
votes
1 Answers
0
votes
JMeter automatically treats HTTP Status codes below 400 as successul, it doesn't perform any checks on the response content and isn't smart enough to automatically determine whether you are logged in or not.
Response Assertion is some form of an explicit check against the response so no matter it the response has HTTP Status code 200 (OK) it will be marked as failed if it for example doesn't contain the required stanza.
So add View Results Tree listener to your Test Plan and inspect response details for correct and incorrect credentials and then configure Response Assertion according to your scenario. See How to Use JMeter Assertions in Three Easy Steps article for more information on different assertions types.