Search code examples
androidandroid-testing

What to do to ignore test case in Android?


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


Solution

  • 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.