觀察大多數的GUI應用程式,可以發現兩種常見的現象,其一是「不同的操作方式可以達成相同的目的」,例如,複製文字可以使用快捷鍵Ctrl+C或是滑鼠右鍵均可,這種現象在本論文稱為多選一。其二是「不同的操作順序可以達成相同的目的」,例如,「改變字體」及「設定字型」這兩個操作的先後順序可以任意改變,本論文稱為隨意順序。由於GUI測試人員必須確保上述現象能正常操作,所以必須對GUI應用程式進行對應的測試。其中一個測試方式是撰寫測試腳本,然而撰寫腳本時,測試人員必須使用邏輯判斷式,或是以傳遞參數的方式來控制各個操作方式或順序,不但浩費時間,並且測試腳本也會變得不好閱讀且難以維護。因此,本論文提出一個測試多選一與隨意順序的方法,以簡化測試人員開發測試腳本的工作,並且自動產生對應的測試路徑。此外,對於一個大型的待測程式而言,其測試腳本中隨意順序與多選一現象可能很多,而測試路徑的數量也會隨之成長,因此,本論文亦提出一套減少測試路徑的方法,以降低執行測試的時間。
From the observation of most GUI applications, two common phenomena can found. The first, called Multiple Choice, is that “two (or more) different operations can be used to achieve the same goal.” For example, to copy the selected text in a word processing application, one can either use “shortcut keys Ctrl+C” or “right click the mouse.” The second, called Arbitrary Sequence, is that “different ordering of operations can be used to achieve the same goal.” For example, the ordering of changing the font size and font face can be different. When a tester performs GUI testing for an application with multiple choices or arbitrary sequences, it is important to make sure that all choices and sequences are tested. However, such a test script may require logical statements and/or parameters to distinguish each different choice or sequence, requiring extra test-script development efforts and making the test script less readable and more difficult to maintain. This thesis proposes testing methods for Multiple Choices and Arbitrary Sequences. By using the proposed methods, a tester can easily create test scripts from which test paths corresponding to each choice and sequence can be generated automatically. In addition, since a large application may contain many multiple choices and arbitrary sequences, the total number of test paths can be enormously large. Therefore, this thesis also proposes a method that can reduce the number of test paths and shorten the test-case execution time.