Erik B
Erik B

Reputation: 42594

OCUnit - Break on test case failure?

When debugging test case failures it would be very useful if the execution would automatically break upon test case failure, so that I could directly investigate the failure. So essentially a break point that triggers when an assertion fails.

Does anyone know if there is an easy way to do that?

Upvotes: 1

Views: 121

Answers (1)

Sulthan
Sulthan

Reputation: 130132

There are many solutions how can you achieve that, to list a few:

  1. Add a symbolic breakpoint to [SenTestCase failWithException:]
  2. Overriding failWithException: in a SenTestCase
  3. Use your own testing macros, which you can break after the fail

Upvotes: 2

Related Questions