改进的限制性随机测试算法及其在面向对象软件测试中的应用

发布时间:2017-12-31 05:10

  本文关键词:改进的限制性随机测试算法及其在面向对象软件测试中的应用 出处:《江苏大学》2017年硕士论文 论文类型:学位论文


  更多相关文章: 软件测试 面向对象软件测试 自适应随机测试 时间开销 限制性区域


【摘要】:软件测试作为一种保证软件质量的有效方法,在软件开发过程中不可缺少。随着市场对软件产品的需求日益增多,软件产品的开发技术也越来越多,其中面向对象技术因为在重用性及扩展性等方面具有独特的优势,使得其成为应用最广的软件开发技术之一。但同时面向对象技术具有的特性也给软件开发带来了很多新的问题,对软件测试的影响最为明显。当前,面向对象软件测试方法中常用的是随机测试(Random Testing,RT)。实验证明,RT减少了挑选测试用例时的时间开销,降低了软件开发的成本,但是RT的有效性并不好。为了提高RT检测错误的有效性,T.Y.Chen等人提出了改进后的RT方法即自适应随机测试(Adaptive Random Testing,ART)方法。ART算法有多种实现方案,其中基于限制性区域的自适应性随机测试(Restricted Random Testing,RRT)算法是一种常用的ART实现方案。RRT在所有已执行测试用例周围生成一个排斥区域,下一个测试用例在所有排斥区域之外选取。实验证明RRT算法的有效性优于RT算法,但是RRT算法挑选测试用例的时间开销过大,这意味着在使用RRT进行软件测试时要花费过多的时间,不利于软件开发商节省人力物力,所以提高RRT算法的时间效率很有必要。本文针对上述问题提出了RRTtp算法,同时为了验证RRTtp的有效性和正确性,论文对两种算法做了大量的实验对比分析;并将两种算法应用到了面向对象程序的测试。论文的主要工作阐述如下:1.针对RRT在挑选测试用例时的时间开销过大的缺点,提出了一种改进的RRTtp算法。RRTtp的主要思想是在所有已执行测试用例周围生成排斥区域和可选区域,然后将所有可选区域进行比较挑出其中最大的一个,下一个测试用例就在该最大区域中随机生成。在进行最大可选区域的挑选时,首先对所有已执行测试用例进行排序,得到两个测试用例间可选区域的大小;然后对比所有的可选区域并挑出最大的一个;在每次比较时都需要记录并更新最大可选区域的起始点和终点,以便在最大区域随机生成下一个测试用例。2.实现了RRT和RRTtp算法在面向对象中的应用。在测试数值型程序时,测试用例间的距离即为数值上的差异,但是将两种算法应用到面向对象程序测试时,无法直接计算测试用例之间的距离。基于这个问题论文首先给出了本文所使用的测试用例间的距离表现形式;然后对测试用例的结构进行了研究分析;将测试用例的距离定义动态距离和静态距离之和,并分别给出了具体的动态部分和静态部分的距离计算公式,从而结合RRT和RRTtp算法实现了测试用例间的距离计算及其在面向对象软件测试中的应用。3.设计并实现了基于RRT和RRTtp算法的测试原型系统。该系统根据RRT和RRTtp在数值型程序和面向对象程序之间的应用,分别设计了数值型程序测试模块和非数值型程序测试模块。其中数值型程序模块主要包括算法执行和结果分析两大模块;非数值型程序测试模块包括类图录入、测试用例距离度量、算法执行和结果分析模块等。
[Abstract]:Software testing is a effective method to guarantee the quality of software, is indispensable in the process of software development. With the market demand for software products is increasing, the development of software products technology more and more, the object oriented technology because of unique advantages in reusability and expansibility. And makes it become one of the software development technology the most widely used object oriented characteristics. But at the same time also to the software development technology has brought many new problems, impact on software testing is the most obvious. At present, the commonly used object oriented software testing method of random testing (Random Testing, RT). The experimental results show that RT reduces the selection of test cases the time cost, reduce the cost of software development, but the effectiveness of the RT is not good. In order to improve the effectiveness of RT error detection, T.Y.Chen et al. Proposed the improved RT method is adaptive Should the random testing (Adaptive Random Testing, ART).ART algorithm is realized in various programs, which is based on adaptive random testing restricted area (Restricted Random Testing RRT) algorithm is a commonly used implementation scheme of ART.RRT in all execution of test cases generated around a rejection region, a test case in all rejection region selection. Experimental results demonstrate the effectiveness of the RRT algorithm is better than RT, but the RRT algorithm to select the test time overhead is too large, which means that in the use of RRT software to spend too much time, not conducive to software developers to save manpower and material resources, so it is necessary to improve the RRT algorithm's time aiming at the above problems. The efficiency of RRTtp algorithm is proposed. At the same time in order to verify the effectiveness and correctness of RRTtp, this paper has done a lot of experiments on the contrast analysis of the two algorithms; and two An algorithm is applied to the test object oriented program. The main work is described as follows: 1. for the RRT in the selection of test cases when the time overhead of big shortcomings, puts forward the main idea of an improved RRTtp.RRTtp algorithm is in all executed test cases generated around the rejection region and the optional area, then all the optional area compared to pick one of the biggest, the next test case in the largest area randomly generated. The maximum area of optional choose, first of all executed test cases are sorted to two test cases between the optional area size; then a comparison of all the available area and pick out the biggest; record and update the starting point and end point of the largest optional fields are needed in each comparison, in order to the maximum area under a randomly generated test case.2. RR The application of T and RRTtp algorithm in object oriented process. In the numerical test program, the test case is the distance between the numerical difference, but the two kinds of object oriented program to test algorithm, test cases can not calculate the distance between this problem directly. This paper gives the test cases used in this article the distance between the forms based on; then studies the structural analysis of the test case; test case definition of distance and static dynamic distance and distance, and gives the calculation formula of dynamic and static parts of a specific part of the distance, and the combination of RRT and RRTtp algorithm of distance calculation between test cases and in the application of.3. design in object oriented software testing and implementation of test and prototype system of RRT based on RRTtp algorithm. The system based on RRT and RRTtp in the numerical program and object oriented Between applications, design numerical program test module and non numeric program testing module. The two modules of the numerical program modules include algorithm implementation and results; non numeric program testing module including class entry, test distance measurement, algorithm implementation and results analysis module.

【学位授予单位】:江苏大学
【学位级别】:硕士
【学位授予年份】:2017
【分类号】:TP311.53

【参考文献】

相关期刊论文 前6条

1 涂径玄;陈林;许蕾;卢红敏;徐宝文;;考虑类特性的面向对象错误定位[J];计算机学报;2013年12期

2 陈锦富;卢炎生;谢晓东;;一种构件安全测试错误注入模型[J];计算机研究与发展;2009年07期

3 陈锦富;卢炎生;谢晓东;;软件错误注入测试技术研究[J];软件学报;2009年06期

4 郑卿卿;辛晓辉;;面向对象软件的测试方法[J];信息技术与标准化;2008年11期

5 赵荣利;崔志明;陈建明;;面向对象软件测试技术的研究与应用[J];计算机技术与发展;2007年01期

6 金凌紫;面向对象软件测试技术进展[J];计算机研究与发展;1998年01期



本文编号:1358276

资料下载
论文发表

本文链接:https://www.wllwen.com/shoufeilunwen/xixikjs/1358276.html


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

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