基于持續集成的Android自動化測試.pdf
2015 年 第24 卷 第 5 期 計 算 機 系 統 應 用
①
基于持續集成的Android 自動化測試
王 焱, 張 征
(華中科技大學 自動化學院, 武漢 430074)
摘 要: Android 測試方面的研究大多集中在測試工具和框架的實現上, 有些工具和框架可以實現測試用例的自
動生成和測試腳本的自動執行. 然而在項目開發過程中, 測試這個活動是需要人工啟動的, 不能及時有效地保證
新增或者修改代碼的質量. 在 Robotium 測試框架的基礎上, 通過研究持續集成方案, 包括被測代碼和測試代碼
的托管、版本控制, 應用的自動構建, 測試的自動執行, 實現了Android 的自動化測試平臺. 使用該測試平臺, 可
以及時自動地對被測代碼的修改進行測試, 直觀可控地保證了Android 應用的質量.
關鍵詞: Android 測試; Robotium 框架; 自動化測試; 持續集成
Continuous Integration Based Study on Automated Testing for Android Platform
WANG Yan, ZHANG Zheng
(School of Automation, Huazhong University of Science & Technology, Wuhan 430074, China)
Abstract: Research on Android test mostly focused on the realization of the testing tools and frameworks, some tools
and frameworks can realize automatic test case generation and test scripts execution. However, during software
development, test requires human start, thus can't guarantee the quality of new or modified code timely and effectively.
Based on Robotium framework, this paper researched continuous integration solution, including the code under test and
the test code hosting, version controlling, building the application and test automatically, finally realized the Android
automation test platform. With the test platform, the code updates can be test automatically in time, the quality of the
Android applications can be intuitive and controllable.
Key words: Android test; Robotium framework; automated testing; continuous integration
伴隨著Android 系統的走紅, 市場對Android 應用 其功能強大、使用簡單贏得了大量的用戶, 它能夠模
程序(APP)的開發提出了更高的要求, 快速推出、快速 擬幾乎所有的用戶操作, 實現對APP 全面的功能測試.
迭代、快速響應用戶的需求. 然后在這個 “快速” 的過 同時, 國內外學術領域對Android 測試也有很多研究.
程中, APP 的質量難以等到保證, 在用戶使用時出現應 張燦