標籤:
視頻地址:
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:
接下來就是原理:
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自動化測試學習曆程