在進行網站應用程式測試時,必須先找出網頁中的元件(簡稱為網頁元件),使得測試工具可以對網頁元件發出事件(動作)並驗證其結果。雖然網頁元件可以從網頁原始碼中識別出來,但是網頁原始碼可能會非常冗長且難以閱讀,因此,識別網頁元件是非常費時費力的工作。本論文提出一個自動偵測與識別網頁元件的方法,並強化網站應用程式測試工具HyperGTT的功能,以支援本論文所提出的方法,包含即時轉換網頁元件、自動群組、架構比對等功能。此外,本論文增進HyperGTT對於動態網頁的測試能力,以便測試包含JavaScript和AJAX程式碼的網頁,使得HyperGTT對於網站應用程式測試的支援更完善,在維護測試腳本時也能更省時省力。
When a web page is tested, components of the webpage (called webpage components) must be identified so that events (actions) to the webpage components can be fired and the results can be verified. Although webpage components can be identified from the HTML source code. it is a very time-consuming and laborious work, since the HTML code can be very length and difficult to read. This thesis proposes a method that can automatically detect and identify webpage components. A web testing tool, called HyperGTT, is enhanced to support the proposed method, including capabilities such as real-time conversion, automatic grouping, and structural matching of webpage components. In addition, HyperGTT is enhanced to support the testing of dynamic webpages that contain JavaScript and AJAX code. The improvements allow HyperGTT to support web application testing better, and can save testers’ time and effort when maintaining test scripts.