在 AndroidTestCase 中使用 @Ignore [英] Use @Ignore in AndroidTestCase
本文介绍了在 AndroidTestCase 中使用 @Ignore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 AndroidTestCase 进行一些单元测试,并且想知道是否可以使用我为 junit4 阅读过的忽略注释?只是使用注解会报错,也许,有什么特别要注意的?
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?
提前谢谢,马库斯
推荐答案
您可以在测试用例类或单个测试方法上使用 @Suppress
来抑制测试执行.
You can use @Suppress
on the test case class or individual test methods to suppress test execution.
这篇关于在 AndroidTestCase 中使用 @Ignore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文