透過您的圖書館登入
IP:3.128.198.21
  • 學位論文

以模型為基礎的圖形介面測試自動化技術

Model-Based Automated GUI Testing Techniques

指導教授 : 王凡
若您是本文的作者,可授權文章由華藝線上圖書館中協助推廣。

摘要


大多數的圖形使用者介面測試工具都是藉由圖形使用者介面的元件庫來做辨識以達到更有效率的測試。在這邊我們提出了一套以模型為基礎的圖形使用者介面測試流程,而這個流程不需要倚賴待測程式的元件庫,我們的測試流程使用了圖形化測試腳本語言Sikuli來辨識及點選螢幕上的物件。為了使測試案例的執行達到更好的效率,我們加入了AutoIt這套工具,與Sikuli相比較,它可以更快判別圖形介面上由Windows API所開發的元件,因此在這套流程裡將使AutoIt與Sikuli可以共同運行。流程的步驟如下,首先,使用者必須先定義待測程式的規範,而規範包含了狀態轉移表(state-transition table)以及每一個狀態(state)和轉態(transition)的特徵(feature),特徵可以為圖片或元件的屬性;再來,我們的工具將會依據待測程式的規範來建立模型(model),並且根據此模型的資訊以及透過模型檢驗(model checking)的技術,我們可以自動產生一群轉態涵蓋率(transition coverage)相當高的測試案例;最後,我們的工具將會把這群測試案例轉譯成可執行的Sikuli或AutoIt的腳本,接著使用者便可執行腳本來獲得一份錯誤報告(bug report)。同時我們也將這套流程拿來實際測試於不同平台上的程式。

並列摘要


Most graphical user interface (GUI) testing tools rely on the recognition of GUI widget libraries for efficient test execution. We present a model-based GUI testing flow independent of the GUI widget libraries of the application-under-test (AUT). Our testing flow uses the Sikuli visual script language to recognize and click on visual patterns on a screen. To reach better performance of test cases execution, we make Sikuli to work together with AutoIt, a tool which can capture widgets implemented by Windows API much faster. In the first step of testing flow, users define the specification of the AUT, which includes the state transition table and the ”feature” (a picture or some attributes of the object) of each state and transition. In the second step, our tool builds a model of the AUT according to the specification, and then generates test cases automatically. Note that, with the information of the model and some model checking techniques, our tool can generate test cases that reach quite high transition coverage. At the last step, our tool translates the test cases generated from the model to executable Sikuli (or AutoIt) scripts. After the scripts have been generated, users can execute the scripts and get the bug report. We use our testing flow approach to test applications implemented on different platforms (Windows and Web page).

參考文獻


[5] R. Alur and D. L. Dill. A theory of timed automata. Theoretical Computer Science, 126:183–235, 1994.
[6] F. Belina and D. Hogrefe. The ccitt-specification and description language sdl. Computer Networks and ISDN Systems, 16(4):311–341, March 1989.
[7] E. Borger and R. Stark. Abstract State Machines: A Method for High-Level System Design and Analysis. Springer-Verlag, 2003.
[8] R. Brunelli. Template Matching Techniques in Computer Vision: Theory and Practice. Wiley, 2009.
[9] T.-H. Chang, T. Yeh, and R. C. Miller. Gui testing using computer vision. In Proceedings of the 28th international conference on Human factors in computing systems, CHI ’10, pages 1535–1544, New York, NY, USA, 2010. ACM.

延伸閱讀