一种基于RRT技术的面向对象软件测试方法
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:An object oriented software testing method based on RRT technology
  • 作者:陈锦富 ; 奚家祥 ; 于敏杰 ; 黄如兵 ; 包骐豪
  • 英文作者:CHEN Jinfu;XI Jiaxiang;YU Minjie;HUANG Rubing;BAO Qihao;School of Computer Science and Communication Engineering,Jiangsu University;
  • 关键词:面向对象软件测试 ; 自适应随机测试 ; 距离度量 ; 测试用例结构 ; 限制性随机测试
  • 英文关键词:object-oriented software testing;;adaptive random testing;;distance measurement;;test case structure;;restricted random testing
  • 中文刊名:JSLG
  • 英文刊名:Journal of Jiangsu University(Natural Science Edition)
  • 机构:江苏大学计算机科学与通信工程学院;
  • 出版日期:2019-01-10
  • 出版单位:江苏大学学报(自然科学版)
  • 年:2019
  • 期:v.40;No.204
  • 基金:国家自然科学基金资助项目(61202110,61502205)
  • 语种:中文;
  • 页:JSLG201901012
  • 页数:9
  • CN:01
  • ISSN:32-1668/N
  • 分类号:72-80
摘要
针对目前面向对象软件的测试方法较少且效率不高的问题,提出将基于ART(adaptive ran-dom testing)思想的限制性随机测试RRT(restricted random testing)应用到面向对象程序中的方法.分析了面向对象软件测试用例的结构,提出了测试用例包含动态部分和静态部分.确定测试用例之间的距离为动态部分和静态部分的距离和,并分别给出了这2个距离的计算公式.设计了基于RRT的测试原型系统,该原型系统主要的功能模块有类图录入模块、测试用例距离度量模块、基于RRT测试用例生成模块、结果分析模块.通过试验对比了文中方法与随机测试方法.结果表明,文中提出面向对象的RRT方法在发现第1个程序错误的测试中比随机测试方法减少了约50%的测试用例数量,且在发现测试用例的质量上也几乎与随机测试相同.文中提出的测试用例度量机制能够有效地对面向对象软件中的测试用例进行区分,基于RRT的测试原型系统也能自动化地生成测试用例并自动测试从而大大提高了面向对象软件测试的效率.
        To solve the problems that the current testing methods for object-oriented software are less and inefficient,an approach of restricted random testing( RRT) was proposed based on adaptive random testing( ART) for object-oriented programs. The structure of object-oriented software test cases was analyzed,and the test cases were suggested with dynamic part and static part. The distance between the test cases was given as the distance between the dynamic part and the static part,and the formulas for calculating the distance between the dynamic part and the static part were given respectively. A prototype system was designed based on RRT. The main modules of the prototype system were class diagram entry module,test case distance measurement module,RRT test cases generation module and result analysis module. The proposed method was compared with random testing method by experiments. The results show that compared with the random test method,the proposed object-oriented RRT method can reduce the number of test cases by about 50% in detecting the first program error,and the quality of the test cases is almost the same as the random testing. The proposed test case measurement mechanism can effectively distinguish test cases in object-oriented software. The RRT-based test prototype system can also automatically generate test cases and automatically test the software,which greatly improves the efficiency of object-oriented software testing.
引文
[1]CHEN J F,KUO F C,CHEN T Y,et al.A similarity metric for the inputs of OO programs and its application in adaptive random testing[J].IEEE Transactions on Reliability,2017,66(2):373-401.
    [2]孙涛,叶新铭.针对软件中2路并发行为完全覆盖的测试方法[J].重庆邮电大学学报(自然科学版),2014,26(6):727-736.SUN T,YE X M.Full coverage testing method for 2-way concurrent behaviors in software[J].Journal of Chongqing University of Posts and Telecommunications(Natural Science Edition),2014,26(6):727-736.(in Chinese)
    [3]CHEN T Y,KUO F C,TOWEY D,et al.A revisit of three studies related to random testing[J].Science China Information Sciences,doi:10.1007/s11432-015-5314-x.
    [4]王荣丽,肖宇虹,侯秀萍.通信不确定MPI并行程序的测试数据自动生成方法[J].吉林大学学报(理学版),2016,54(6):1378-1382.WANG R L,XIAO Y H,HOU X P.Test data automatic generation method for communication of uncertainty MPI parallel program[J].Journal of Jilin University(Science Edition),2016,54(6):1378-1382.(in Chinese)
    [5]张志宏,何海江,刘华富.由分类算法学习软件错误定位的关联测度[J].四川大学学报(自然科学版),2017,54(4):728-734.ZHANG Z H,HE H J,LIU H F.Learning association measures of software fault localization with classification algorithms[J].Journal of Sichuan University(Natural Science Edition),2017,54(4):728-734.(in Chinese)
    [6]王辉,王哲,刘淑芬.基于路径收益计算的网络攻击路径行为分析方法[J].吉林大学学报(理学版),2017,55(2):311-321.WANG H,WANG Z,LIU S F.Path behavior analysis method of network attack based on path revenue calculation[J].Journal of Jilin University(Science Edition),2017,55(2):311-321.(in Chinese)
    [7]WU H Y,NIE C H,PETKE J,et al.An empirical comparison of combinatorial testing,random testing and adaptive random testing[J].IEEE Transactions on Software Engineering,doi:10.1109/TSE.2018.2852744.
    [8]CHEN T Y,KUO F C,MERKEL R G,et al.Adaptive random testing:the ART of test case diversity[J].Journal of Systems&Software,2010,83(1):60-66.
    [9]NIE C H,WU H Y,NIU X T,et al.Combinatorial testing,random testing,and adaptive random testing for detecting interaction triggered failures[J].Information and Software Technology,2015,62:198-213.
    [10]BARUS A C,CHEN T Y,KUO F C,et al.A cost-effective random testing method for programs with non-numeric inputs[J].IEEE Transactions on Computers,2016,65(12):3609-3623.
    [11]KOO D S,PARK Y B.OFART:Openflow-switch adaptive random testing[C]∥Proceedings of the Advances in Computer Science and Ubiquitous Computing.doi:10.1007/978-981-10-3023-9_97.
    [12]QI Y C,WANG Z Y,YAO Y M.Influence of the distance calculation error on the performance of adaptive random testing[C]∥Proceedings of the 2017 IEEE International Conference on Software Quality,Reliability and Security Companion.Piscataway:IEEE,2017:316-319.
    [13]PATRICK M,JIA Y.Kernel density adaptive random testing[C]∥Proceedings of the 2015 IEEE 8th International Conference on Software Testing,Verification and Validation Workshops.Piscataway:IEEE,doi:10.1109/ICSTW.2015.7107451.
    [14]SABOR K K,THIEL S.Adaptive random testing by static partitioning[C]∥Proceedings of the 2015 IEEE/ACM 10th International Workshop on Automation of Software Test.Piscataway:IEEE,2015:28-32.
    [15]HUANG X Y,ZHANG S D,ZHOU L J,et al.Improving random test sets using a locally spreading approach[C]∥Proceedings of the 2017 IEEE International Conference on Software Quality,Reliability and Security.Piscataway:IEEE,2017:32-41.
    [16]CHAN K P,CHEN T Y,TOWEY D.Restricted random testing[C]∥Proceedings of the 7th European Conference on Software Quality.Heidelberg:Springer Verlag,2002:321-330.
    [17]CHAN K P,CHEN T Y,TOWEY D.Restricted random testing:adaptive random testing by exclusion[J].International Journal of Software Engineering&Knowledge Engineering,2006,16(4):553-584.
    [18]MAYER J,SCHNECKENBURGER C.An empirical analysis and comparison of random testing techniques[C]∥Proceedings of the 5th ACM-IEEE International Symposium on Empirical Software Engineering.New York:ACM,2006:105-114.
    [19]MERNIK M.An object-oriented approach to language compositions for software language engineering[J].The Journal of Systems and Software,2013,86:2451-2464.
    [20]MADHWARAJ K G.Empirical comparison of two metrics suites for maintainability prediction in packages of object-oriented systems:a case study of open source software[J].Journal of Computer Science,2014,10(11):2330-2338.
    [21]SAKTI A,PESANT G,GUHNEUC Y G.Instance generator and problem representation to improve object oriented code coverage[J].IEEE Transactions on Software Engineering,2015,41(3):294-313.
    [22]RAJNISH K.Another new complexity metric for objectoriented design measurement[J].International Journal of Hybrid Information Technology,2014,7(2):203-216.
    [23]SHAHBAZI A,MILLER J.Black-box string test case generation through a multi-objective optimization[J].IEEE Transactions on Software Engineering,2016,42(4):361-378.
    [24]LEUNG H,CHEN T Y.A new perspective of the proportional sampling strategy[J].The Computer Journal,1999,42(8):693-698.

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

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

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