Anyone successful in debugging unit tests for iPhone?

后端 未结 5 1921
Happy的楠姐
Happy的楠姐 2020-12-25 09:09

I found examples on how to debug your unit test in Cocoa or the ADC page here. But I can\'t get the debugging to work for an iPhone app target. I can get the tests up and ru

5条回答
  •  抹茶落季
    2020-12-25 09:30

    This can be done by setting up a separate Executable for the project that uses the otest tool to run the unit tests, after setting a bunch of relevant environment variables for the executable. I have used this method to successfully debug SenTestKit logic unit tests.

    I found the following links helpful:

    http://www.grokkingcocoa.com/how_to_debug_iphone_unit_te.html (also contains help to fix common errors encountered setting up the project).

    http://cocoawithlove.com/2009/12/sample-iphone-application-with-complete.html (covers both logic tests and application tests)

    http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/otest.1.html (Man Page for otest XCode tool)

提交回复
热议问题