0
votes

I´m testing a software and its architecture with jmeter, I'm using a webservice that inserts some values to a table and in the middle of the load I shutdown the database server (I'm using a sql cluster architecutre) then, the backup server starts to recive the threads.... There´s a period of dead time between shutting down the main server and the start of the backup server... in that period of time, jmeter says the request was succesfully completed (maybe because the app server is active) but that´s not true beacuse there´s no any database server active that can process the request... If I check the "view results as tree" response I have this:

<errorCode>751</errorCode>

<errorMessage>Cannot open database "DBNAME" requested by the login. The login failed.
Login failed for user 'USER'.</errorMessage>
  1. Why is jmeter saying the response was ok when there isn't a database active?
  2. How can I filter the results so jmeter only counts the results that are ok? or how can I say to jmeter that when the response has that error message it should count as an error?
1

1 Answers

0
votes

JMeter considers HTTP Status Codes below 400 as successful, the fact your application returns HTTP Status code 200 (OK) or whatever below 400 indicates its incorrect behavior.

If you are totally sure that your application acting as designed you might want to configure JMeter to check response body to ensure that it doesn't contain <errorCode> and/or <errorMessage> tags via Response Assertion.

Check out Response Assertions in JMeter 3.2 - New and Improved article for more information on assertions concept, learn how to conditionally fail JMeter samplers and what exact configuration is needed to get this done