How to run a Unit Test

I have an Xcode 4.2 project with unit tests, how do I run them in AppCode. I can't find any menu command to run the tests. One would think that would be an easy thing to rund, a test instead of run menu command.

Gee, one main reason I do not use AppCode is the lack of documentation is a killer.

0

Hi,

You first add a new OCUnit target to your AppCode project from the Run menu (Edit Configurations). Then you can select the UnitTest target in the upper right corner of the IDE and run your tests with the green arrow.

With regards,

Rutger

0

You can also run a test from the current context with a shortcut or a menu:

Screen Shot 2011-12-15 at 15.21.53 .png

0

Is there a "trick" in App code for running the OCUnit tests after the app is launched.

Is there a document that describes running the tests without the app and with the app?

Thanks!

0

Dave,

AppCode doesn't have any special configuration - it simply runs tests from the corresponding targets for you.
There are 2 types of unit tests in OC - Logic and Application (I guess you refer to the latter when saying "running tests when after the app is launched").

You can check apple's documentation regarding the configuration of various types of tests: http://developer.apple.com/library/ios/#documentation/DeveloperTools/Conceptual/UnitTesting/00-About_Unit_Testing/about.html#//apple_ref/doc/uid/TP40002143-CH1-SW1

Regards,
Anton Makeev

0

Thanks for the link.

Does App Code support creating test classes like intellij does? If not I think that's a feature that should be added.

Thanks,

Dave Crane
www.lonemoosesoftware.com

0

请先登录再写评论。