Android-Junit-Report测试报告生成——Android自动化测试学习历程
2015-05-17 17:09
609 查看
视频地址:
http://www.chuanke.com/v1983382-135467-384869.html
这个内容其实已经在用了,我在上一篇文章robotium—只有apk文件的测试中已经讲过这个内容了,并且自己也用Python+wxpython写了界面程序,来实现跑case+获取xml运行结果+xml转html+发送邮件的功能
主要内容:
一、测试需求
1、统计每个case的执行时间
2、哪些case成功、失败
3、失败的case给出log
4、产生网页html报告结果
二、环境部署
以robotium为例,需要的环境:
1、JDK1.7、Android开发环境
2、Robotium的jar包
3、android-junit-report.jar包
三、报告生成原理
去官网瞅瞅:http://zutubi.com/,通过点击open source可进入下载页面下载
Grab the jar from the downloads page and add it to your
Edit
Edit
Run your tests as you would normally:
Pull the resulting XML report from the device (from the application under test's internal storage directory):
Integrate the XML with your chosen build tool.
接下来就是原理:
1、com.zutubi.android.junitreport.JUnitReportTestRunner——具体见上面描述,需要修改的地方是两个,一个是instrumentation的tag,一个是Run As的Run Configuration,修改Instrumentation runner的值
2、调用机制:
三层封装:
Junit Report---》Robotium---》Instrumentation
四、脚本实现自动化后续收集工作
脚本1——运行testcase
脚本2——把xml从手机内存卡pull出来
脚本3——把xml转换成html
脚本4——把html的报告合并到手工、压力、性能报告中去
脚本5——发送邮件周知即可
Done!还是需要自己去写。。。
http://www.chuanke.com/v1983382-135467-384869.html
这个内容其实已经在用了,我在上一篇文章robotium—只有apk文件的测试中已经讲过这个内容了,并且自己也用Python+wxpython写了界面程序,来实现跑case+获取xml运行结果+xml转html+发送邮件的功能
主要内容:
一、测试需求
1、统计每个case的执行时间
2、哪些case成功、失败
3、失败的case给出log
4、产生网页html报告结果
二、环境部署
以robotium为例,需要的环境:
1、JDK1.7、Android开发环境
2、Robotium的jar包
3、android-junit-report.jar包
三、报告生成原理
去官网瞅瞅:http://zutubi.com/,通过点击open source可进入下载页面下载
quick start
For the impatient, here is an overview of how to integrate the runner with Ant builds. Note all modifications are made to your test project, i.e. the project which implements the JUnit tests:Grab the jar from the downloads page and add it to your
libs/directory.
Edit
AndroidManifest.xmlto set
android:namein the
<instrumentation>tag to:
com.zutubi.android.junitreport.JUnitReportTestRunner.
Edit
ant.propertiesto add the line:
test.runner=com.zutubi.android.junitreport.JUnitReportTestRunner
Run your tests as you would normally:
$ ant debug install test
Pull the resulting XML report from the device (from the application under test's internal storage directory):
$ adb pull /data/data/<main app package>/files/junit-report.xml
Integrate the XML with your chosen build tool.
接下来就是原理:
1、com.zutubi.android.junitreport.JUnitReportTestRunner——具体见上面描述,需要修改的地方是两个,一个是instrumentation的tag,一个是Run As的Run Configuration,修改Instrumentation runner的值
2、调用机制:
三层封装:
Junit Report---》Robotium---》Instrumentation
四、脚本实现自动化后续收集工作
脚本1——运行testcase
脚本2——把xml从手机内存卡pull出来
脚本3——把xml转换成html
脚本4——把html的报告合并到手工、压力、性能报告中去
脚本5——发送邮件周知即可
Done!还是需要自己去写。。。
相关文章推荐
- android-junit-report工具实现android下junit框架测试自动生成报告
- Android 自动化测试—robotium(七) 使用Junit_report测试报告
- Android 自动化测试—robotium(九) Junit_report测试报告重定向输出到终端SDCard
- jenkins+maven+junit构建自动化测试,整合junit xml生成直观的测试报告
- Android使用Robotium自动化测试junit生成单元测试结果报告
- 雾山的Robotium学习笔记---使用junitreport导出测试报告
- 雾山的Robotium学习笔记---使用junitreport导出测试报告
- ant02---加入junit来自动化测试 并 生成测试报告
- jenkins+maven+junit构建自动化测试,整合junit xml生成直观的测试报告
- jenkins+maven+junit构建自动化测试,整合junit xml生成直观的测试报告[留存]
- [转]截图原理(一)——Android自动化测试学习历程(2)
- [转]截图原理(一)——Android自动化测试学习历程(1)
- Selenium自动化测试在PageObject下的架构与测试报告生成
- Mac Eclipse+Maven+TestNg+ReportNg 生成测试报告
- 生成 HTMLTestRunner 测试报告学习总结
- android UiAutomator修改UiAutomatorHelper生成测试报告
- Appium基于python unittest自动化测试并生成html测试报告
- Eclipse+Maven+TestNg+ReportNg 生成测试报告
- 截图原理(一)――Android自动化测试学习历程
- android UiAutomator利用快速调试生成excel文档测试报告