If you using JUnit 4.x, you can follow this way
1 | @Ignore // add this annotation to ignore following method |
2 | @Test |
3 | public void methodUnderTest() |
Change name of testmethod or remove annotation
Be aware that failing tests are indicators for you, that something goes wrong that you have to fix. So its a bad idea to remove or deactivate testcases or methods. Instead fix the problem or change the requirements your testcase holds.
For your convenience:
If you use junit 3.x simply rename the testmethod or prefix it with "failing", for example
1 | public void failingtestCalculateResult() {...} |
So you can simply search after "failingtest" over your complete project to find all this deactivated testmethods.
If you use junit 4.x simply remove the @Test anotation at the testmethod.
If you want to skip a whole testcase simple rename it in the same way. For example.
MyRepositoryTest to MyRepositoryFailing.