Instrumentation测试框架:
测试集合基于JUnit,可以扩展Android JUnit来测试Android组件。
android create test-project -m .. -p tests
Activity.onResume函数,不能直接调用,通过仪表盘API可以触发并且测试。
两者方法,调用ActivityInstrumentationTestCase2.getActivity
mActivity=this.getActivity()
或者用Instrument类提供的辅助API
Instrumentation instr = this.getInstrumentation()
instr.callActivityOnResume(mActivity)
仪表盘技术需要使用意图创建待测活动,当活动有跳转
使用robotium编写集成测试用例
具体看书吧。。。这本书真的不错,推荐购买。。。