It seems that I have everything set up correctly. When I run command ⌘ + U (or select Product > Test from menu) my test runs fine.
Best practices should be that test are run as often as possible, ideally during each build (understand during each run).
How do I force Xcode 4 to do it? I have tried to:
but nothing seems to work. Does anyone have success setting up this?
Finally figured it out, though still not perfect:
This makes your test target build when running the app. Thanks to "Test after build" also the tests run. If everything is ok, app starts in sim. If there are any failing tests, you get a crash, if you use STAssert
. In case of OCMock
, you can check what exactly went wrong in log inspector.
Sometimes breakpoints do not work. To get them working try product - perform action - test without building.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With