面向?qū)ο筌浖䴗y試中高效自適應(yīng)隨機測試算法研究
發(fā)布時間:2018-01-21 19:07
本文關(guān)鍵詞: 面向?qū)ο筌浖?自適應(yīng)隨機測試 測試輸入 時間代價 出處:《江蘇大學》2017年碩士論文 論文類型:學位論文
【摘要】:隨著面向?qū)ο缶幊蘋OP(Object Oriented Programming)技術(shù)的快速發(fā)展,OOP已成為當前主流編程技術(shù)之一,并被廣泛應(yīng)用于設(shè)計和開發(fā)面向?qū)ο筌浖﨩OS(Object Oriented Software,)。面向?qū)ο笳Z言的繼承性,封裝性和多態(tài)性等特性,在提高了軟件的可重用性,可擴展性和互操作性的同時也增加了測試OOS的難度。研究人員提出了多種測試方法來測試OO,其中隨機測試RT(Random Testing)由于其簡單性和易用性而被廣泛應(yīng)用。為了提高RT的故障檢測能力,TY Chen等人提出自適應(yīng)隨機測試ART(Adaptive Random Testing)。將ART應(yīng)用于OOS時,需要合適的計算OOS測試用例之間差異性的距離度量標準。Ciupa等人提出用于測試單個類的面向?qū)ο笞赃m應(yīng)隨機測試方法ARTOO(Adaptive Random Testing for Object-Oriented software),其使用的距離度量標準用于計算兩個對象之間的距離。Lin等人在ARTOO的基礎(chǔ)上,提出一種基于多樣化的自適應(yīng)隨機測試方法DO-ART(Divergence-Oriented approach to Adaptive Random Testing)用于處理多維的測試。Chen等人提出對象和方法序列相似性度量OMISS(Object and Method Invocation Sequence Similarity),用于計算包含一個對象集合和一個方法調(diào)用序列的測試用例之間的距離,并實現(xiàn)了一個測試方法OMISS-ART。實驗表明,ARTOO,DO-ART和OMISS-ART的故障檢測效率都高于RT,但是時間開銷也遠高于RT。為了降低這三個算法的時間開銷,本文提出將所有已執(zhí)行測試用例信息保存成一個整體,并將候選用例與已執(zhí)行測試用例集合間的一對多的計算,轉(zhuǎn)變?yōu)橐粚σ坏挠嬎?從而降低算法的時間開銷。本文的主要工作如下:1.提出OMISS-ARTsum算法。OMISS-ARTsum算法是使用改進的OMISS度量,并采用max-sum標準的固定候選集自適應(yīng)隨機測試FSCS-ART(Fixed-Sized-Candidate-Set ART)的一個實現(xiàn)版本。OMISS-ARTsum算法在從候選測試用例集合中挑選下一個待執(zhí)行測試用例時,計算每個候選用例與已執(zhí)行測試用例集合的總距離,并且與傳統(tǒng)的基于max-sum的FSCS-ART算法不同,OMISS-ARTsum不是計算每個已執(zhí)行測試用例和候選用例的距離再求和得到總距離,而是采用將所有已執(zhí)行測試用例的信息保存成一個整體,一次計算出已執(zhí)行測試用例集合與候選用例之間的距離。因此,與OMISS-ART算法相比,OMISS-ARTsum算法具有更低的時間開銷。2.提出ARTOOsum和DO-ARTsum算法。ARTOOsum和DO-ARTsum是基于改進的ARTOO度量,并采用max-sum選擇標準的FSCS-ART算法的兩個實現(xiàn)版本。其中,ARTOOsum用于處理單個類的單方法測試,即其測試用例包含一個對象和一個方法。而DO-ARTsum的測試用例可以包含一個對象和多個方法。ARTOOsum和DO-ARTsum都采用將所有已執(zhí)行測試用例信息保存成一個整體,然后只利用改進的ARTOO度量公式一次計算出一個候選用例和已執(zhí)行測試用例集合之間的距離,然后挑選候選用例中到已執(zhí)行測試用例集合距離最遠的那個作為下一個待執(zhí)行測試用例。因此,ARTOOsum和DO-ARTsum算法都具有接近線性的時間復雜度。3.設(shè)計并實現(xiàn)了一個測試原型系統(tǒng),用于自動化測試本文提出的算法,并驗證其有效性和效率。系統(tǒng)包括類圖錄入模塊、測試用例池生成模塊、測試驅(qū)動模塊、算法執(zhí)行模塊和結(jié)果統(tǒng)計與分析模塊等。
[Abstract]:With the object oriented programming OOP (Object Oriented Programming) the rapid development of technology, OOP has become one of the current mainstream programming technology, and is widely used in the design and development of object oriented software OOS (Object Oriented Software). The inheritance of object-oriented languages, encapsulation and polymorphism, the software can be improved reusability, scalability and interoperability test also increased the difficulty of OOS. Researchers have proposed a variety of test methods to test OO, the random test (Random Testing) RT because of its simplicity and ease of use and is widely used. In order to improve the fault detection capability of RT TY proposed by Chen et al. Adaptive random testing ART (Adaptive Random Testing). The application of ART in OOS, to calculate OOS between the appropriate test cases the difference of distance metric is proposed by.Ciupa et al. Used to test single class surface The ARTOO object to the adaptive random testing method (Adaptive Random Testing for Object-Oriented software), the distance metric used for calculating the distance of two objects between.Lin and others on the basis of ARTOO, we propose a DO-ART adaptive random testing method based on diversity (Divergence-Oriented approach to Adaptive Random Testing) for the treatment of multidimensional test by.Chen et al. The sequence of the object and method of similarity measure of OMISS (Object and Method Invocation Sequence Similarity), is used to calculate the test case consists of a set of sequences between an object and a method invocation of the distance, and implement a test method of OMISS-ART. experiment showed that ARTOO, DO-ART and OMISS-ART fault detection efficiency is higher than RT, but the time cost is much higher than that of RT. in order to reduce the time overhead of the three algorithms, this paper will All executed test case information is stored as a whole, and the candidate cases have been performed with the test case set a one to multi calculation, into a calculation algorithm to reduce the time cost. The main work of this paper are as follows: 1.. The proposed OMISS-ARTsum algorithm.OMISS-ARTsum algorithm is used to improve the OMISS metric. And the max-sum standard fixed candidate set adaptive random testing FSCS-ART (Fixed-Sized-Candidate-Set ART) the implementation of a version of the.OMISS-ARTsum algorithm in the collection from the candidate test case selection next to execution of test cases, the calculation of each candidate cases have been performed with the total distance of the test case set, and with the traditional FSCS-ART algorithm based on max-sum different, OMISS-ARTsum is not calculated for each executed test case and case candidate sum total distance distance, but with all the Test cases executed information is stored as a whole, a calculated between the test case set and the candidate cases distance has been performed. Therefore, compared with the OMISS-ART algorithm,.2. OMISS-ARTsum algorithm has lower time overhead of the proposed ARTOOsum and DO-ARTsum algorithms.ARTOOsum and DO-ARTsum is a metric based on improved ARTOO, to achieve the two version of the FSCS-ART algorithm and the max-sum standard. The ARTOOsum test method for single single class, namely the test case consists of an object and a method. And DO-ARTsum test cases can contain an object and a plurality of methods of.ARTOOsum and DO-ARTsum are used to all executed test case information is saved in a overall, then using the improved ARTOO measurement formula one calculates a candidate case and executed the test case set the distance between, then select In the case of candidate to have executed the test case set the distance from that as the next executing test cases. Therefore, ARTOOsum and DO-ARTsum algorithm has the design complexity of.3. is nearly linear time and implemented a prototype system for automated testing, test the proposed algorithm, and verify its effectiveness and efficiency the system includes class diagram input module, test case pool generation module, test drive module, algorithm execution module and the results of statistics and analysis module.
【學位授予單位】:江蘇大學
【學位級別】:碩士
【學位授予年份】:2017
【分類號】:TP311.53
【參考文獻】
相關(guān)期刊論文 前1條
1 CHEN Tsong Yueh;KUO Fei-Ching;TOWEY Dave;ZHOU Zhi Quan;;A revisit of three studies related to random testing[J];Science China(Information Sciences);2015年05期
,本文編號:1452329
本文鏈接:http://www.sikaile.net/kejilunwen/ruanjiangongchenglunwen/1452329.html
最近更新
教材專著