要測試一個Web-based的系統,除了基本的單元測試之外,還需要對畫面及相關功能做測試,但是測試畫面及功能需要手動執行或額外撰寫Script,因此若能整合並自動化介面測試及單元測試,在系統功能測試上將可節省大量人工作業。在本論文中,我們整合了能自動化Rails單元測試的程式Translator,以及開發自動產生部分Sikuli Script的功能來協助測試Rails Web畫面的功能。我們使用了Sikuli這個圖形介面工具,實際進行截圖並擷取其所需的參數,然後在Controller標記##SikuliPage與##SikuliParams註解的方式,來自動產生Sikuli Script,讓使用者執行Translator時,同時產生測試程式內部用的Rails Unit Test與測試畫面用的部分Sikuli Script。
To test a Web-based system, besides the unit tests, we also need to test the web pages and their related functionalities. But such functional tests usually require manual operations or writing additional test scripts. If we can integrate and automate interface test and unit test, we can save a lot of manual work. In this thesis, we combine a Translator program, which can generate Rails unit tests, with additional modules that can generate parts of Sikuli Script to help test the functionalities of Rails web pages. We use Sikuli to capture actual screenshots and to retrieve the required parameters. By marking ##SikuliPage and ##SikuliParams annotations on controller programs, we can generate Sikuli script automatically. This allow the Translator to generate Rails unit test and part of Sikuli script at the same time.