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

元件抽象化之GUI測試方法

GUI Testing with Component Abstraction

指導教授 : 陳偉凱

摘要


圖形使用者介面(GUI)已被廣泛的使用在各種應用軟體中,因此GUI測試(GUI testing)是一個很重要的研究議題。一般而言,進行GUI測試必須先撰寫(或以工具產生)測試腳本(Test Script),以便自動執行大量的使用者事件與驗證的動作,本論文首先提出一個整合測試驅動開發與錄影播放測試的方法,讓測試者能獲得兩種方法的好處,我們研究成果也顯示這樣的整合方法比直接寫程式的方式來的有效率多了。其二,是現今的測試腳本技術,其實只有對GUI的行為進行抽象化,並沒有考慮到GUI結構,因此當GUI發生變動時,測試腳本就會變的難以維護。因此本論文提出了元件抽象化(Component Abstraction)方法,以物件基礎來描述GUI的結構為行為,研究結果也顯示使用元件抽象化,的確能提昇腳本的可讀性、可維護性、可重複使用性。其三,我們將元件抽象化與使用案例契約進行整合,來對GUI進行自動化的系統化測試,利用此方法可以有效的自動化產生測試案例,對GUI各種行為的互動,進行完整的系統測試,研究結果我們的方法能有效的找到GUI上的缺陷。

並列摘要


Most of today's software users interact with the software through a graphical user interface (GUI). Hence, GUI testing plays an important role in ensuring the correctness of software applications. To perform GUI testing, a test script must be prepared so that massive user interactions and verifications can be conducted automatically. Capture/replay (CR) is a common method that creates test scripts by recording user interactions of an application under test (AUT). However, a deficiency of CR technologies is that test scripts cannot be generated before the AUT is ready for testing. Thus, specification-based approaches have been studied as alternatives. This dissertation studies how a CR technology can be integrated with a specification-based approach and show that the integration is beneficial by a case study. Ideally, the actions of a test script should be organized based on the structure of the GUI so that the actions are easier to extend and maintain. Unfortunately, current methodologies and tools fall short in supporting such an organization. Thus, even a tiny change in GUI may break a large number of existing test scripts (cases). To overcome this problem, this dissertation proposes an “object-based” approach, called component abstraction, to model the structure of a GUI. A GUI testing modeling language, GTML, is defined and a systematic approach in applying component abstraction is described. Three case studies are conducted to show that a GTML script is both easier to maintain and extend than an ordinary test script. To perform a comprehensive GUI testing, a large number of test cases are needed. We propose a GUI test-case generation approach that is suitable for system testing. The key idea is to extend high-level GUI scenarios with contracts and use the contracts to infer the ordering dependencies of the scenarios. From the ordering dependencies, a state machine of the system is constructed and used to generate test cases automatically. A case study is conducted to investigate the quality of the test cases generated by the proposed approach. The results showed that, in comparison to creating test cases manually, the proposed approach can detect more faults with less human effort.

參考文獻


[44] T. Yeh, T.-H. Chang, and R. C. Miller, “Sikuli: using gui screenshots for search
Ph.D. dissertation, 2001, advisors: Mary Lou Soffa and Martha Pollack; Committee
[84] X. Yuan, M. Cohen, and A. M. Memon, “Covering array sampling of input event
M.-A. D. Storey, Eds. IEEE Computer Society, 2003, pp. 260–269.
and automation,” in UIST, A. D. Wilson and F. Guimbreti`ere, Eds. ACM, 2009,

被引用紀錄


李玠錞(2013)。Web應用程式之雲端效能測試系統〔碩士論文,國立臺北科技大學〕。華藝線上圖書館。https://doi.org/10.6841/NTUT.2013.00471
陳怡靜(2012)。一個支援元件抽象化的Android GUI測試工具〔碩士論文,國立臺北科技大學〕。華藝線上圖書館。https://doi.org/10.6841/NTUT.2012.00718

延伸閱讀