当前位置:主页 > 科技论文 > 软件论文 >

面向对象软件测试中高效自适应随机测试算法研究

发布时间:2018-01-21 19:07

  本文关键词: 面向对象软件 自适应随机测试 测试输入 时间代价 出处:《江苏大学》2017年硕士论文 论文类型:学位论文


【摘要】:随着面向对象编程OOP(Object Oriented Programming)技术的快速发展,OOP已成为当前主流编程技术之一,并被广泛应用于设计和开发面向对象软件OOS(Object Oriented Software,)。面向对象语言的继承性,封装性和多态性等特性,在提高了软件的可重用性,可扩展性和互操作性的同时也增加了测试OOS的难度。研究人员提出了多种测试方法来测试OO,其中随机测试RT(Random Testing)由于其简单性和易用性而被广泛应用。为了提高RT的故障检测能力,TY Chen等人提出自适应随机测试ART(Adaptive Random Testing)。将ART应用于OOS时,需要合适的计算OOS测试用例之间差异性的距离度量标准。Ciupa等人提出用于测试单个类的面向对象自适应随机测试方法ARTOO(Adaptive Random Testing for Object-Oriented software),其使用的距离度量标准用于计算两个对象之间的距离。Lin等人在ARTOO的基础上,提出一种基于多样化的自适应随机测试方法DO-ART(Divergence-Oriented approach to Adaptive Random Testing)用于处理多维的测试。Chen等人提出对象和方法序列相似性度量OMISS(Object and Method Invocation Sequence Similarity),用于计算包含一个对象集合和一个方法调用序列的测试用例之间的距离,并实现了一个测试方法OMISS-ART。实验表明,ARTOO,DO-ART和OMISS-ART的故障检测效率都高于RT,但是时间开销也远高于RT。为了降低这三个算法的时间开销,本文提出将所有已执行测试用例信息保存成一个整体,并将候选用例与已执行测试用例集合间的一对多的计算,转变为一对一的计算,从而降低算法的时间开销。本文的主要工作如下:1.提出OMISS-ARTsum算法。OMISS-ARTsum算法是使用改进的OMISS度量,并采用max-sum标准的固定候选集自适应随机测试FSCS-ART(Fixed-Sized-Candidate-Set ART)的一个实现版本。OMISS-ARTsum算法在从候选测试用例集合中挑选下一个待执行测试用例时,计算每个候选用例与已执行测试用例集合的总距离,并且与传统的基于max-sum的FSCS-ART算法不同,OMISS-ARTsum不是计算每个已执行测试用例和候选用例的距离再求和得到总距离,而是采用将所有已执行测试用例的信息保存成一个整体,一次计算出已执行测试用例集合与候选用例之间的距离。因此,与OMISS-ART算法相比,OMISS-ARTsum算法具有更低的时间开销。2.提出ARTOOsum和DO-ARTsum算法。ARTOOsum和DO-ARTsum是基于改进的ARTOO度量,并采用max-sum选择标准的FSCS-ART算法的两个实现版本。其中,ARTOOsum用于处理单个类的单方法测试,即其测试用例包含一个对象和一个方法。而DO-ARTsum的测试用例可以包含一个对象和多个方法。ARTOOsum和DO-ARTsum都采用将所有已执行测试用例信息保存成一个整体,然后只利用改进的ARTOO度量公式一次计算出一个候选用例和已执行测试用例集合之间的距离,然后挑选候选用例中到已执行测试用例集合距离最远的那个作为下一个待执行测试用例。因此,ARTOOsum和DO-ARTsum算法都具有接近线性的时间复杂度。3.设计并实现了一个测试原型系统,用于自动化测试本文提出的算法,并验证其有效性和效率。系统包括类图录入模块、测试用例池生成模块、测试驱动模块、算法执行模块和结果统计与分析模块等。
[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

【参考文献】

相关期刊论文 前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

资料下载
论文发表

本文链接:https://www.wllwen.com/kejilunwen/ruanjiangongchenglunwen/1452329.html


Copyright(c)文论论文网All Rights Reserved | 网站地图 |

版权申明:资料由用户99755***提供,本站仅收录摘要或目录,作者需要删除请E-mail邮箱bigeng88@qq.com