ActivityUnitTestCase和ActivityInstrumentationTestCase2的区别 [英] Difference between ActivityUnitTestCase and ActivityInstrumentationTestCase2

查看:681
本文介绍了ActivityUnitTestCase和ActivityInstrumentationTestCase2的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid仪表案件。我一直在寻找的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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆