There is a web page which is supposed to display current month's sales of five types of items. One bug report says that a server error message is displayed on this page and the sales report is not displayed.

To deal with this bug, a new test case was made to check if there is no server error message on that page. Nothing else is verified in that test.

This does not make sense to me because the bug's test case does not tell me which scenario replicates the problem. If we don't know the scenario that caused the bug, then how can we (confidently) claim to have fixed it & verified that it does not occur anymore ?

I don't know if I am missing something here. Are there any circumstances where its okay to test for absence of exceptions or error messages in an application ?

2 Answers 2


If it has shown up in the UI in production and must be prevented then a UI test case is appropriate

However I would look beyond that at:

  • Are there unit test(s) for that functionality ?
  • Are there integration tests for that functionality ?
  • Does the test case include a positive assertion? Negative onlys are fooled by 404s, etc.
  • What is the reason the the failure? One time configuration or just a program change for a feature, bug etc. ? I can break many things with incorrect or unreal configurations, but that doesn't mean I need user acceptance tests for all those outcomes. However I might want tests on the configuration piece itself.

I don't think that specific test cases are required to test for the absence of exceptions or error messages in an application.

Test cases are written keeping in mind, broadly two types of scenarios:

  1. Positive test scenarios

  2. Negative test scenarios

While executing positive test scenarios, you test that the application should not throw any exception or error. So, positive test cases take care of that aspect.

While executing negative test scenarios, you test that error messages do appear when some undesired data/action is performed in the application.

So, I personally don't think specific test cases to cover absence of exceptions or error messages are required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.