ActivityUnitTestCase和ActivityInstrumentationTestCase2的区别 [英] Difference between ActivityUnitTestCase and ActivityInstrumentationTestCase2
问题描述
我是新来的Android仪表案件。我一直在寻找的API样本,发现有时候我们使用ActivityUnitTestCase和ActivityInstrumentationTestCase2。两者之间的区别是什么?什么时候我们使用一个比其他?
I am new to Android Instrumentation cases. i have been looking at the API samples and see that sometimes we use ActivityUnitTestCase and the ActivityInstrumentationTestCase2. What is the difference between the two ? When would we use one over the other ?
推荐答案
请参阅这里讨论的区别: <一href="http://www.vogella.com/articles/AndroidTesting/article.html#activity_testing">http://www.vogella.com/articles/AndroidTesting/article.html#activity_testing
See the difference discussed here: http://www.vogella.com/articles/AndroidTesting/article.html#activity_testing
要点:
- ActivityUnitTestCase可用于测试布局和分离的方法。
- ActivityInstrumentationTestCase2可以在需要时发送触摸/鼠标事件,并测试状态管理使用。
这篇关于ActivityUnitTestCase和ActivityInstrumentationTestCase2的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!