Xcode 4 Unit test: Can I ignore some test cases?

Is there a way to ignore a specific test case without commenting on it?

Some tests are written before the implementation exists, so before I execute any code, I would like these flags to be ignored, so it does not prove to any of my colleagues.

Commenting on the results, they lose track of failed, incomplete tests.

+7
source share
3 answers

You can right-click on the test in the left pane and select "Disable".

+11
source

There is no built-in way to annotate tests in OCUnit (SenTestingKit).

One approach is to change the name of the test method. I add "XXX" to the beginning of the test, which I want to disable, but want it to continue compiling. For example,

- (void)XXXtestSomething 

Then I can find "XXXtest" to find all disabled test methods.

+2
source

This should be possible with the customization of the Other Test Flags assembly. from

  -SenTest ClassToTest 

you can specify classes for testing, but not separate methods.

More information can be found here: Quick module testing, red sweater

0
source

All Articles