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


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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM