Warning: No instrumentation runner found for the launch, using android.test.InstrumentationTestRu

AndroidManifest.xml   
    
<uses-library android:name="android.test.runner"/>   
    
<instrumentation   
        android:name="android.test.InstrumentationTestRunner"  
        android:targetPackage="com.myapp.tests"                
        android:label="MyAppTests" />   
    
1.继承androidTestCase类。   
2.Assert类判断所得到值与期望值是否相同。   
  
单击“Android JUnit Test”运行后会,会出现如下警告:   
It outputs Warning: No instrumentation runner found for the launch, using   
android.test.InstrumentationTestRunner.   
模拟器不能记住Androidmanifest的配置,在运行时需要重新设置运行配置,如下:   
1.在工程名字上点击右键,选择properties   
2.在Run/Debug setting中选择要运行的工程名字,点击右边的Edit,会进入下面的界面,   
在 instrumentation runner后面的下拉列表中选择:android.test.InstrumentationTestRunner   
3.重新运行该测试单元,则就不会出现上面的警告了。 

 

 

REFERENCES:http://www.cnblogs.com/tjpfly/archive/2011/05/25/2056717.html

转载地址:http://www.cnblogs.com/anee/archive/2012/12/18/2822700.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值