Reputation: 501
Currently my app has a somewhat unstable development environment and a few of my tests will result in a false negative. If one of my tests fails in my Subliminal test suite, the entire suite stops! This is not what I want and I dont want to do something like surrounding my tests in try/catch blocks so how do I prevent my Subliminal test suite from stopping after one fail?
Upvotes: 1
Views: 102
Reputation: 7102
There are two scenarios in which an exception thrown as part of a Subliminal test suite will cause the whole suite to stop. These are:
setUpTest
method, which runs before the test cases in the test suite begin executing. In this case none of the test cases will execute.SLAssert
macro. Expected exceptions are the ones that the test case (or setUpTest
for that matter) actually look for via SLAssert
calls. Any other exceptions are considered to be essentially bugs in the test suite/case itself---something went wrong that the tests weren't prepared to handle. So the suite stops at that point instead of continuing with the app in a state it might not be able to handle.From your comment it sounds like you ran into the second case. You could probably get the tests to continue by adding additional SLAssert
calls to look for the unexpected issue that you're seeing (or by resolving whatever issue caused the exception in the first place).
Upvotes: 1