在Activity中使用
startInstrumentation(new ComponentName( "com.syl.Camera.test","android.test.InstrumentationTestRunner"), null,null)
可启动Instrumentation来进行测试,ComponentName中分别为完整的包名,和manifest中定义的Instrumentation的name。
本文介绍如何在Android Activity中启动Instrumentation进行自动化测试。通过使用startInstrumentation方法,并指定待测应用的完整包名及Instrumentation名称,实现测试过程。
在Activity中使用
startInstrumentation(new ComponentName( "com.syl.Camera.test","android.test.InstrumentationTestRunner"), null,null)
可启动Instrumentation来进行测试,ComponentName中分别为完整的包名,和manifest中定义的Instrumentation的name。
1430

被折叠的 条评论
为什么被折叠?