计算机应用 ›› 2015, Vol. 35 ›› Issue (10): 2990-2994.DOI: 10.11772/j.issn.1001-9081.2015.10.2990

• 行业与领域应用 • 上一篇    下一篇

面向对象软件测试的蜕变关系构造方法

侯雪梅, 于磊, 张兴隆, 李志博   

  1. 信息工程大学 网络空间安全学院, 郑州 450001
  • 收稿日期:2015-04-14 修回日期:2015-07-09 出版日期:2015-10-10 发布日期:2015-10-14
  • 通讯作者: 侯雪梅(1981-),女,河南商丘人,讲师,硕士,主要研究方向:软件测试、软件可靠性理论,hihouxue@163.com
  • 作者简介:于磊(1974-),男,山东青岛人,副教授,博士,CCF会员,主要研究方向:软件工程、软件质量管理;张兴隆(1992-),男,山东淄博人,硕士研究生,主要研究方向:软件测试;李志博(1982-),女,河南商丘人,讲师,硕士,主要研究方向:软件测试。
  • 基金资助:
    国家自然科学基金资助项目(61402525);郑州市科技攻关计划项目(141PPTGG383)。

Constructing method of metamorphic relations in object-oriented software testing

HOU Xuemei, YU Lei, ZHANG Xinglong, LI Zhibo   

  1. College of of Cyberspace Security, Information Engineering University, Zhengzhou Henan 450001, China
  • Received:2015-04-14 Revised:2015-07-09 Online:2015-10-10 Published:2015-10-14

摘要: 针对面向对象软件类级测试中方法序列调用时的Oracle问题,提出了一种基于代数规格的面向对象蜕变关系构造方法,并根据此方法进行蜕变测试。首先基于代数规格给出面向对象测试中蜕变关系的构造准则,然后根据构造准则对GFT(Generating a Finite number of Test cases)算法中范式构造蜕变关系方法进行改进,最后通过一个整数栈类对提出的蜕变关系构造准则进行了验证测试,并与GFT算法中范式构造蜕变关系方法进行了对比,结果表明在相似的变异检测率下,改进后的方法使得构造的蜕变关系冗余度降低了66%,验证了改进的蜕变关系构造方法有更低的蜕变关系冗余度,提高了软件测试效率。

关键词: 面向对象, 蜕变关系, 代数规格, 变异检测率

Abstract: To solve the Oracle problem of method sequence call in object-oriented software testing, a method of metamorphic relations constructing for object-oriented software testing based on algebraic specification was proposed. Firstly, metamorphic relations constructing criteria for object-oriented testing was defined based on the algebraic specification. Then the normal form metamorphic relations constructing method in the Generating a Finite number of Test cases (GFT) algorithm was improved according to these criteria. Finally, the improved method was verified through constructing IntStack class metamorphic relations. The experimental results showed that, compared with the normal form metamorphic relations constructing method, the metamorphic relations redundancy was reduced by 66% at the same mutation score. The results indicate that the new method has a low metamorphic relations redundancy and improves the efficiency of software testing.

Key words: object-oriented, metamorphic relation, algebraic specification, mutation score

中图分类号: