文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > Test and Instrumentation
侵权投诉

Test and Instrumentation

Testing和Instrumentation

Android提供了一系列强大的测试工具,它针对Android的环境,扩展了业内标准的JUnit测试框架。尽管你可以使用JUnit测试Android工程,但Android工具允许你为应用程序的各个方面进行更为复杂的测试,包括单元层面及框架层面。

Android测试环境的主要特征有:

可以访问Android系统对象。

框架可以控制和测试应用程序。 Instrumentation

Android系统常用对象的模拟版本。

运行单个

支持以test或test suite的工具,带或不带Instrumentation。 Eclipse的ADT插件和命令行方式管理Test和Test工程。

这篇文章是对Android测试环境和测试方法的简要介绍,并假设你已经拥有一定的Android应用程序编程及JUnit测试的经验。

概要

Android测试环境的核心是一个Instrumentation框架,在这个框架下,你的测试应用程序可以精确控制应用程序。使用Instrumentation,你可以在主程序启动之前,创建模拟的系统对象,如Context;控制应用程序的多个生命周期;发送UI事件给应用程序;在执行期间检查程序状态。Instrumentation框架通过将主程序和测试程序运行在同一个进程来实现这些功能。

通过在测试工程的manifest文件中添加<instrumentation>元素来指定要测试的应用程序。这个元素的特性指明了要测试的应用程序包名,以及告诉Android如何运行测试程序。在Inustrumentation TestRunner章节有更多的细节描述。

下面的图片概要的描述了Android的测试环境:

第1页

你可能喜欢

热门文档

相关文档

  • Instrumentation_and_control_for_loop_test

    An Instrumentation and Control for Loop Test 21-24 Aug. 2012 S.H. Ahn, J.T. Hong, C.Y. Joung, S.J. Park Neutron Utilization Technology Division...

  • Test and Cloud

    U-test and T-test 7页 1财富值 test and u test 26页 免费 Test and Design for Test 10页 免费 Test and Instrumentation 8页 5财富值...

  • Instrumentation--

    37页 免费 Process Measurement Inst... 68页 2财富值 Test and Instrumentation 8页 5财富值 Lecture_8_Instrumentatio... 5页 2财富值喜欢此文档的还喜欢...

  • 02-Instrumentation

    instrumentation 28页 2财富值 Instrumentation 1页 免费 instrumentation 3页 2财富值 IO Instrumentation 142页 免费 Test and Instrumentation 8页 5财富值 ...

  • Instrumentation

    68页 2财富值 Test and Instrumentation 8页 5财富值 Lecture_8_Instrumentatio... 5页 2财富值 6_3 DSP_BIOS:监测(instr... 33页 免费...

  • Instrumentation

    68页 2财富值 Test and Instrumentation 8页 5财富值 Lecture_8_Instrumentatio... 5页 2财富值 6_3 DSP_BIOS:监测(instr... 33页 免费...

  • Shock and Vibration Test report

    2003 Shock: FSP and Fixture Instrumentation Accelerometers are installed on the DSF to verify proper test geometry and to monitor the shock input ...

  • SENSORS FOR TEST AND MEASUREMENT

    SENSORS FOR TEST AND MEASUREMENT_机械/仪表_工程科技_专业资料。To measure ...testing, medical instrumentation, plant management, weighing, and process ...

  • 灯泡调光测试方法

    5 TEST SETUP 5.1 General A) Test Setup and Instrumentation: The test can be performed using an absolute photometry method or a relative photometry ...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email