zoukankan      html  css  js  c++  java
  • Android 自动化测试—robotium(六) 通过命令行执行Robotium自动化测试用例及导出报告

    1、运行测试工程下的所有用例

    adb shell am instrument -w com.application.test/android.test.InstrumentationTestRunner // 测试包名/mainfest下的instrumentation name属性

    2、运行指定的单个测试类或某个TestSuite

    运行测试类com.application.test.Login

    adb shell am instrument -e class com.application.test.Login -w com.application.test/android.test.InstrumentationTestRunner

    3、运行某个测试类里面的某个测试方法

    运行com.application.test.Login中的测试方法testLogin

    adb shell am instrument -e class com.application.test.Login#Login -w com.application.test/android.test.InstrumentationTestRunner

    4、运行两个不同的测试类或类中的方法

    运行com.application.test.Login和com.application.test.Logoff类中的方法testLogoff

    adb shell am instrument -e class com.application.test.Login,com.application.test.Logoff#testLogoff -w com.application.test/android.test.InstrumentationTestRunner

    5、使用junit-report.jar包并指定运行后测试报告生成到sdcard下

    adb -d shell am instrument -w -e reportDir sdcard com.application.test/com.zutubi.android.junitreport.JUnitReportTestRunner”

    adb -d pull sdcard/junit-report.xml D:jenkinsjobs estworkspace

  • 相关阅读:
    bzoj 2120 数颜色 带修改莫队
    luogu 2709 小B的询问 莫队
    bzoj 2002 [Hnoi2010]Bounce 弹飞绵羊 分块
    bzoj 4765 普通计算姬 dfs序 + 分块
    loj 数列分块入门 6 9(区间众数)
    loj 数列分块入门 5 7 8
    AtCoder Grand Contest 021 D
    Codeforces Round #466
    office 威胁检测
    修改macos的启动LOGO
  • 原文地址:https://www.cnblogs.com/dtest/p/4153376.html
Copyright © 2011-2022 走看看