Finally I realized, although still not perfect:
- In the test target program, verify that Test After Build is set to Yes.
- In your main application scheme - build - under "run" also check the test suite.
This makes your test target build at application startup. Thanks to "Test after build" tests also pass. If everything is in order, the application runs in sim. If there are any failed tests, you get a failure if you use STAssert . In the case of OCMock you can check what exactly went wrong in the log controller.
Sometimes breakpoints do not work. To make them work, try the product - perform the action - test without assembly.
source share