面向?qū)ο筌浖䴗y(cè)試中高效自適應(yīng)隨機(jī)測(cè)試算法研究
發(fā)布時(shí)間:2018-01-21 19:07
本文關(guān)鍵詞: 面向?qū)ο筌浖?自適應(yīng)隨機(jī)測(cè)試 測(cè)試輸入 時(shí)間代價(jià) 出處:《江蘇大學(xué)》2017年碩士論文 論文類型:學(xué)位論文
【摘要】:隨著面向?qū)ο缶幊蘋OP(Object Oriented Programming)技術(shù)的快速發(fā)展,OOP已成為當(dāng)前主流編程技術(shù)之一,并被廣泛應(yīng)用于設(shè)計(jì)和開發(fā)面向?qū)ο筌浖﨩OS(Object Oriented Software,)。面向?qū)ο笳Z言的繼承性,封裝性和多態(tài)性等特性,在提高了軟件的可重用性,可擴(kuò)展性和互操作性的同時(shí)也增加了測(cè)試OOS的難度。研究人員提出了多種測(cè)試方法來測(cè)試OO,其中隨機(jī)測(cè)試RT(Random Testing)由于其簡(jiǎn)單性和易用性而被廣泛應(yīng)用。為了提高RT的故障檢測(cè)能力,TY Chen等人提出自適應(yīng)隨機(jī)測(cè)試ART(Adaptive Random Testing)。將ART應(yīng)用于OOS時(shí),需要合適的計(jì)算OOS測(cè)試用例之間差異性的距離度量標(biāo)準(zhǔn)。Ciupa等人提出用于測(cè)試單個(gè)類的面向?qū)ο笞赃m應(yīng)隨機(jī)測(cè)試方法ARTOO(Adaptive Random Testing for Object-Oriented software),其使用的距離度量標(biāo)準(zhǔn)用于計(jì)算兩個(gè)對(duì)象之間的距離。Lin等人在ARTOO的基礎(chǔ)上,提出一種基于多樣化的自適應(yīng)隨機(jī)測(cè)試方法DO-ART(Divergence-Oriented approach to Adaptive Random Testing)用于處理多維的測(cè)試。Chen等人提出對(duì)象和方法序列相似性度量OMISS(Object and Method Invocation Sequence Similarity),用于計(jì)算包含一個(gè)對(duì)象集合和一個(gè)方法調(diào)用序列的測(cè)試用例之間的距離,并實(shí)現(xiàn)了一個(gè)測(cè)試方法OMISS-ART。實(shí)驗(yàn)表明,ARTOO,DO-ART和OMISS-ART的故障檢測(cè)效率都高于RT,但是時(shí)間開銷也遠(yuǎn)高于RT。為了降低這三個(gè)算法的時(shí)間開銷,本文提出將所有已執(zhí)行測(cè)試用例信息保存成一個(gè)整體,并將候選用例與已執(zhí)行測(cè)試用例集合間的一對(duì)多的計(jì)算,轉(zhuǎn)變?yōu)橐粚?duì)一的計(jì)算,從而降低算法的時(shí)間開銷。本文的主要工作如下:1.提出OMISS-ARTsum算法。OMISS-ARTsum算法是使用改進(jìn)的OMISS度量,并采用max-sum標(biāo)準(zhǔn)的固定候選集自適應(yīng)隨機(jī)測(cè)試FSCS-ART(Fixed-Sized-Candidate-Set ART)的一個(gè)實(shí)現(xiàn)版本。OMISS-ARTsum算法在從候選測(cè)試用例集合中挑選下一個(gè)待執(zhí)行測(cè)試用例時(shí),計(jì)算每個(gè)候選用例與已執(zhí)行測(cè)試用例集合的總距離,并且與傳統(tǒng)的基于max-sum的FSCS-ART算法不同,OMISS-ARTsum不是計(jì)算每個(gè)已執(zhí)行測(cè)試用例和候選用例的距離再求和得到總距離,而是采用將所有已執(zhí)行測(cè)試用例的信息保存成一個(gè)整體,一次計(jì)算出已執(zhí)行測(cè)試用例集合與候選用例之間的距離。因此,與OMISS-ART算法相比,OMISS-ARTsum算法具有更低的時(shí)間開銷。2.提出ARTOOsum和DO-ARTsum算法。ARTOOsum和DO-ARTsum是基于改進(jìn)的ARTOO度量,并采用max-sum選擇標(biāo)準(zhǔn)的FSCS-ART算法的兩個(gè)實(shí)現(xiàn)版本。其中,ARTOOsum用于處理單個(gè)類的單方法測(cè)試,即其測(cè)試用例包含一個(gè)對(duì)象和一個(gè)方法。而DO-ARTsum的測(cè)試用例可以包含一個(gè)對(duì)象和多個(gè)方法。ARTOOsum和DO-ARTsum都采用將所有已執(zhí)行測(cè)試用例信息保存成一個(gè)整體,然后只利用改進(jìn)的ARTOO度量公式一次計(jì)算出一個(gè)候選用例和已執(zhí)行測(cè)試用例集合之間的距離,然后挑選候選用例中到已執(zhí)行測(cè)試用例集合距離最遠(yuǎn)的那個(gè)作為下一個(gè)待執(zhí)行測(cè)試用例。因此,ARTOOsum和DO-ARTsum算法都具有接近線性的時(shí)間復(fù)雜度。3.設(shè)計(jì)并實(shí)現(xiàn)了一個(gè)測(cè)試原型系統(tǒng),用于自動(dòng)化測(cè)試本文提出的算法,并驗(yàn)證其有效性和效率。系統(tǒng)包括類圖錄入模塊、測(cè)試用例池生成模塊、測(cè)試驅(qū)動(dòng)模塊、算法執(zhí)行模塊和結(jié)果統(tǒng)計(jì)與分析模塊等。
[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.
【學(xué)位授予單位】:江蘇大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2017
【分類號(hào)】:TP311.53
【參考文獻(xiàn)】
相關(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期
,本文編號(hào):1452329
本文鏈接:http://sikaile.net/kejilunwen/ruanjiangongchenglunwen/1452329.html
最近更新
教材專著