zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    Android Studio的代码没错,运行时logcat会出现红色语句解决方法
    541. Reverse String II
    Android Studio快速自动生成findViewById
    你真的了解android的layout_weight属性吗?
    572. Subtree of Another Tree
    441. Arranging Coins(可用二分搜索)
    67. Add Binary
    58. Length of Last Word
    724. Find Pivot Index
    我爱java系列--【加密算法的介绍】
  • 原文地址:https://www.cnblogs.com/anee/p/2822700.html
Copyright © 2011-2022 走看看