目前 Android相關測試工具有 Robotium、UiAutomator等,然而使用這些工具時,必須以 Java 程式語言撰寫測試腳本,以致於測試成本居高不下。因此,Calabash - Android採用高階的 Spoken language撰寫測試腳本,較易懂、易學,但是,仍然存在腳本維護與重複使用的問題。因此,本論文提出一套適用於 Robot Framework的測試函式庫,以 Calabash - Android所提供的事件為基礎,支援 Android裝置之 KDT (關鍵字驅動測試),使得測試人員可以使用 Keyword建立測試腳本,並在 Android裝置上進行自動化測試。此外,本論文以實際的 Android應用程式做實驗,分別以 Calabash - Android的 Spoken language測試腳本與本論文所提出的 KDT測試腳本,互相比較兩者所需的開發時間以及維護成本之差異。實驗結果顯示,使用本論文提出的工具撰寫測試腳本時,其腳本可重複使用性高、可維護性較好,且撰寫測試腳本所需時間較短,反之當使用 Spoken language撰寫測試腳本時,其腳本可重複使用性差、可維護性較差,而且所需撰寫時間較長,顯示使用 Keyword撰寫腳本較 Spoken language更有效率。
When testing Android Apps, testing tools such as Robotium and UiAutomator are frequently used. However, these tools require the tester to develop test scripts in Java code, which can be costly. Therefore, instead of using Java code, Calabash - Android allows the tester to develop test scripts in a spoken language, making the test scripts both easier to read and learn. However, a spoken-language test script still exhibits maintenance and reuse problems. Thus, this thesis proposes a Robot-Framework test library, which supports Calabash - Android events and enables KDT (Keyword-Driven Testing) for Android Devices. The test library helps testers to write test scripts with keywords, and can also execute the test scripts automatically on Android devices. In addition, this thesis conducts an experiment, which tests a real Android App and compares the test script of Calabash - Android with the test script of the proposed tool. The results indicate that, when using the proposed tool to develop test scripts, the resulting test scripts are not only easier to reuse and maintain but also require less time to develop.