Android 自动化测试—robotium(六) 通过命令行执行Robotium自动化测试用例及导出报告
2014-12-09 15:23
501 查看
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:\jenkins\jobs\test\workspace\
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:\jenkins\jobs\test\workspace\
相关文章推荐
- 【Android自动化测试之Robotium】04. 命令行运行Android Robotium自动化用例或单元测试用例
- 【Android自动化测试之Robotium】04. 命令行运行Android Robotium自动化用例或单元测试用例
- 【Android自动化测试之Robotium】04. 命令行运行Android Robotium自动化用例或单元测试用例
- 【Android自动化测试之Robotium】04. 命令行运行Android Robotium自动化用例或单元测试用例
- Android自动化测试之Robotium 用例分析
- 命令行运行Android Robotium自动化用例或单元测试用例
- 【Android自动化测试之Robotium】02. Robotium之用例分析
- 【Android自动化测试之Robotium】02. Robotium之用例分析
- Android使用Robotium自动化测试junit生成单元测试结果报告
- Robotium自动化测试利用InstrumentationTestRunner和XmlSerializer导出xml报告到手机里
- Android 自动化测试—robotium(九) Junit_report测试报告重定向输出到终端SDCard
- 【Android自动化测试之Robotium】02. Robotium之用例分析
- Robotium自动化测试利用InstrumentationTestRunner和XmlSerializer导出xml报告到手机里
- 【Android自动化测试之Robotium】02. Robotium之用例分析
- Robotium用例命令行运行、拔除数据线及TestSuite方式执行
- Android 自动化测试—robotium(七) 使用Junit_report测试报告
- 命令行运行Android Robotium自动化用例或单元测试用例
- 【Android自动化测试之Robotium】02. Robotium之用例分析
- Robotium自动化测试利用InstrumentationTestRunner和XmlSerializer导出xml报告到手机里
- Instruments-Automation: 通过命令行执行测试用例