標題: 一個循序Java程式迴歸測試環境之設計
Design of A Sequential Java Program's Regression Testing Environment
作者: 蔡郁彬
Yuh-bin Tsai
鍾乾癸
Chyan-Goei Chung
資訊科學與工程研究所
關鍵字: 迴歸測試;測試個案;regression testing;test case;reflection API;object serialization
公開日期: 1998
摘要: 迴歸測試是對修改過的程式測試其正確性,如何用最少時間來完成測試是迴歸測試研究的重點。以往研究主要是針對結構化程式,物件導向程式的迴歸測試方法則較少討論。Java是一個熱門的新的物件導向程式語言,目前還沒有循序Java程式的迴歸測試方法,因此本論文研究循序Java程式的迴歸測試。 本論文提出了一個漸進式的循序Java程式之迴歸測試方法,對於修改過的循序Java程式,先測試新增和修改過的類別,再重測沒有改變的類別,如果修改過的類別會影響沒有改變的類別,則沒有改變的類別的重測順序,是以繼承和使用的關係,先重測直接繼承或使用修改過的類別之類別,若會繼續往外影響,再重測間接繼承或使用修改過的類別之類別,若不會往外影響,則其他沒改變的類別就不需要重測。對於每個類別的測試/重測,以被呼叫之函式改變的型態來決定呼叫之函式是否需要重測,並且將重測的層級由函式降到路徑。 本論文設計並實作一個循序Java程式之迴歸測試環境,以驗證所提方法的正確性。此迴歸測試環境提供的功能包括: (1) 分析新版和舊版程式之間的差異。 (2) 自動找出可以重複使用和需要重新測試的測試個案。 (3) 提供界面讓測試人員準備單一函式測試/連續函式呼叫測試之測試個案。 (4) 以批次執行的方式自動執行新準備的測試個案和需要重測的測試個案。 (5) 自動比對測試結果。 (6) 儲存測試個案。
The goal of regression testing is to verify the correctness of a modified program. How to execute regression testing efficiently is the main issue of regression testing. Previous research results of regession testing are focused on structural programs. The area of concurrent program’s regression testing has received very little attention. Java is a new and popular object-oriented programming language. No regression testing method and environment designed for Java programs are available yet. Therefore, this paper is focused on sequential Java program’s regression testing. This paper proposes an incremental regression testing method for sequential Java programs. For a modified sequential Java program, new and modified classes are tested first and then unchanged classes. If the modified class will affect unchanged classes, the retest order of unchanged classes is arranged by inheritance and use relationships, i.e. retest the classes that directly inherit/use modified classes. If the test results will affect another classes, retest the classes that indirectly inherit/use the modified classes. Otherwise, other classes needn’t to be retested. While retesting each class, whether one calling method is needed to retest or not depended on the changing type of the called method. Beyond, the retest level is improved from method to path. This paper designs and implements a sequential Java program’s regression testing environment to verify the correctness of the proposed method. The functions supported by the regression testing environment include: (1) Analyze the difference between new and old programs. (2) Automatically filter reusable and need-to-rerun test cases. (3) Support interfaces for tester to prepare test cases of single method testing and method invocation testing. (4) Batched execute prepared test cases and need-to-rerun test cases. (5) Automatically compare test results. (6) Store test cases.
URI: http://140.113.39.130/cdrfb3/record/nctu/#NT870392055
http://hdl.handle.net/11536/64077
顯示於類別:畢業論文