基于输出域的测试用例自动生成方法研究
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:Output Domain Based Automatic Test Case Generation
  • 作者:尤枫 ; 赵瑞莲 ; 吕珊珊
  • 英文作者:You Feng;Zhao Ruilian;Lü Shanshan;Department of Computer Science and Technology,Beijing University of Chemical Technology;
  • 关键词:BP神经网络 ; 软件功能模型 ; 测试用例生成 ; 输出域 ; 遗传算法
  • 英文关键词:BP neural network;;software function model;;test case generation;;output domain;;genetic algorithm
  • 中文刊名:JFYZ
  • 英文刊名:Journal of Computer Research and Development
  • 机构:北京化工大学计算机科学系;
  • 出版日期:2016-03-15
  • 出版单位:计算机研究与发展
  • 年:2016
  • 期:v.53
  • 基金:国家自然科学基金项目(61472025,61170082)~~
  • 语种:中文;
  • 页:JFYZ201603005
  • 页数:9
  • CN:03
  • ISSN:11-1777/TP
  • 分类号:41-49
摘要
对大多数软件,很难根据规格说明自动产生期望的输出.而对于某些软件,输出域存在许多值得关注的检测点,适合于从输出域出发开发测试用例.但对于给定的输出,自动生成相应的输入也较为困难.提出了一种基于输出域的测试用例自动生成方法,首先利用BP神经网络构建被测软件的功能模型,然后在被测软件的功能模型上,对于给定的输出,利用遗传算法搜索相应的输入,实现基于输出域的测试用例自动生成.同时,对遗传算法进行了改进,提出了一种新的交叉算子和变异算子,以提高遗传算法生成测试用例效率,并在容错软件RSDIMU子模块和3个常用软件上进行了模型构建及测试生成实验.实验结果表明,利用遗传算法实现基于输出域的测试用例自动生成方法是行之有效的,改进的遗传算法能够提高测试生成的效率和成功率.
        For most software systems it is very hard to obtain expected output automatically on the basis of specifications.However,there exist many notable detection points in output domain of some software,so it may be more suitable to develop test cases from output domain than from input.In addition,even if an output is given,it is also difficult to find its input automatically.Therefore in this paper,we present an output domain based automatic test case generation method.At first,a back propagation neural network is used to create a model that can be taken as a function substitute for the software under test,and then according to the created function model,genetic algorithms are employed to search the corresponding inputs for given outputs.In order to improve the effectiveness of test case generation,a new crossover operation and a mutation operation are introduced in our genetic algorithm.Moreover,a number of experiments have been conducted on test generation based on the created function models over the fault tolerant software RSDIMU and three common used software.The experimental results show that the approach is promising and effective,and our genetic algorithm can distinctly enhance the efficiency and successful ratio to test case generation from output domains.
引文
[1]Vanmali M,Last M,Kandel A.Using a neural network in the software testing process[J].International Journal of Intelligent Systems,2002,17(1):45-62
    [2]Bhasin H,Singla N.Cellular-genetic test data generation[J].ACM SIGSOFT Software Engineering Notes,2013,38(5):1-9
    [3]He Yanxiang,Chen Yong,Wu Wei,et al.Automatically generating error-traceable test cases based on compiler[J].Journal of Computer Research and Development,2012,49(9):1843-1851(in Chinese)(何炎祥,陈勇,吴伟,等.基于编译支持错误跟踪的测试用例自动化生成方法[J].计算机研究与发展,2012,49(9):1843-1851)
    [4]Aggarwal K K,Singh Y,Kaur A,et al.A neural net based approach to test oracle[J].ACM SIGSOFT Software Engineering Notes,2004,29(4):1-6
    [5]Grznar J,Prasad S,Tata J.Neural networks and organizational systems:Modeling non-linear relationships[J].European Journal of Operational Research,2006,181(2):939-955
    [6]Pinto G H L,Vergilio S R.A multi-objective genetic algorithm to test data generation[C]//Proc of the 22nd IEEE Int Conf on Tools with Artificial Intelligence.Piscataway,NJ:IEEE,2010:129-134
    [7]Chen J F,Yang L M.Towards automatic generation of test data using branch coverage[C]//Proc of the 4th IEEE Int Conf on Computer Science&Education.Piscataway,NJ:IEEE,2009:921-925
    [8]Deepak A,Samuel P.An evolutionary multi population approach for test data generation[C]//Proc of World Congress on Nature&Biologically Inspired Computing.Piscataway,NJ:IEEE,2009:1451-1456
    [9]Zhao R L,Li C C.Automatic test case generation of nonnumerical data based on genetic algorithms[C]//Proc of the9th IASTED Int Conf on Software Engineering and Applications.Anaheim,CA:ACTA,2005:212-217
    [10]PlanetSourceCode.C/C++free code:PlanetSourceCode[EB/OL].[2013-11-12].http://www.Planet-Source-Code.com
    [11]Zhao Ruilian,Dong Hongxia.An effective strategy for selecting boundary test points[J].Journal of ComputerAided Design and Computer Graphics,2007,19(2):251-255(in Chinese)(赵瑞莲,董红霞.一种有效的边界测试点选取策略[J].计算机辅助设计与图形学报,2007,19(2):251-255)

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700