Is there a way of ignoring a specific test case without commenting it out?
Some tests are written before the implementation exists, so before commiting any code I'd like to first flag these tests to be ignored so it doesn't appal any of my colleagues.
Commenting them out results in loosing track of failing, incomplete tests.
Adding a different prefix like “skip_” helps you have a visual aid and understand from a method name that this test method will be skipped and you can also quickly search Xcode for all test methods with the prefix “skip_” to enable them back when ready.
It isn't realistic -- or necessary -- to expect 100% code coverage through unit tests. The unit tests you create depend on business needs and the application or applications' complexity. Aim for 95% or higher coverage with unit tests for new application code.
Excluding Tests / Specs If you want to exclude a specific test, simply use xit() instead of it() . The x means exclude. describe('description', function () { xit('description', function () {}); }); If you want to exclude an entire describe block, use xdescribe() instead of describe() .
To skip running the tests for a particular project, set the skipTests property to true. You can also skip the tests via the command line by executing the following command: mvn install -DskipTests.
You can right click on the test in the left panel and select "Disable ".
There's 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 a test I want to disable but want it to keep compiling. For example,
- (void)XXXtestSomething
Then I can search for 'XXXtest' to find all disabled test methods.
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