Why do my tests stop running on the first exception?

Top  Previous  Next

Isolator++ Professional throws exceptions when it encounters a problem, or when an ASSERT macro has failed to meet its condition. In this case, the current test stops running, but you may see that the complete run has stopped. Depending on your test framework, the reason can be one of the following:

 

·The test framework does not catch the exception, and the rest of the tests stop running (default for Google Test, for example)
·The test framework catches the exception and reports it as a single failing test, and then continues running the rest of the tests(default for UnitTest++, for example)

 

 

In the future, with a specialized test runner, we'll be able to avoid this behavior. Until then, this behavior is dependent on the runner implementation.

 

 


Copyright  Typemock Ltd. 2009-2025.  All Rights Reserved.