I'm working my way through some unit testing with AndroidTestCase and was wondering, if it's possible to use the ignore-annotation, that I've read about for junit4? Just using the annotation gives an error, maybe, there's something special to look out for?
Thanx in advance, Marcus
The @Ignore annotation helps in this scenario. A test method annotated with @Ignore will not be executed. If a test class is annotated with @Ignore, then none of its test methods will be executed.
You can use @Suppress on the test case class or individual test methods to suppress test execution.
If you want to ignore a test method, use @Ignore along with @Test annotation. If you want to ignore all the tests of class, use @Ignore annotation at the class level.
You can use @Suppress
on the test case class or individual test methods to suppress test execution.
You can now use either @Suppress
or @Ignore
when running with AndroidJUnit4
.
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