Question

Hi i just worked on roblectric test cases where we can use @Ignore to ignore the test cases My question is what we can do in case of android unit test cases for AndroidTestCase instrumentation project, is @Suppress of android test cases is same as Robolectric @Igore? please give me some information, already i visited

Use @Ignore in AndroidTestCase

Was it helpful?

Solution 2

AndroidTestCase is kind of JUnit3 which doesn't have analog of JUnit4 @Ignore. The simplest workaround is rename your testXXX() method to ignoreXXX(). This should help because JUnit 3 runs only method with 'test' prefix.

OTHER TIPS

You can use @Suppress on the test case class or individual test methods to suppress test execution.

In 2017, In addition to @santos's answer You can just remove the @Test annotation to ignore the function to test.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top