jmeter read credentials from CSV.worng credentials still script is successful.Does it check database while running?

http://www.markschabacker.com/blog/2013/05/10/jmeter_with_webforms_authentication/

http://ivetetecedor.com/how-to-use-a-csv-file-with-jmeter/

I have followed above links to take credentials from CSV file. I have observed with wrng credentials in CSV file, script PASS. Does this script actually checks database ? I have not experienced though. I have given wrong credentials in CSV but, jmeter script run did not failed for login step.

Upvotes: 0

Views: 165

Answers (1)

Dmitri T
Dmitri T

Reputation: 168162

JMeter treats 2XX and 3XX HTTP response codes as successful. Even if you enter wrong credentials server's response may be 200 so sampler will be considered successful.

The solution to conditionally fail a test is using i.e. Response Assertion which will be looking for Welcome, ${USERNAME} text in the response and mark the test as failed if the line is not found.

See How to Use JMeter Assertions in 3 Easy Steps guide for comprehensive information on all the JMeter Assertions.

Upvotes: 1

Related Questions