基于程序路径分的有效蜕变测试.docVIP

  • 14
  • 0
  • 约2.97万字
  • 约 0页
  • 2017-03-04 发布于贵州
  • 举报
基于程序路径分的有效蜕变测试

基于程序路径分析的有效蜕变测试* 董国伟 聂长海 徐宝文 东南大学计算机科学与工程学院 南京 210096 江苏省软件质量研究所 南京 210096 APCEMST 可以快速准确地发现待测程序中的错误,而生成的测试用例的数量却比传统技术要少. 关键词 软件测试; 蜕变测试; oracle问题; 蜕变关系; 路径覆盖准则 Effective Metamorphic Testing Based on Program Path Analysis* DONG Guo-Wei NIE Chang-Hai XU Bao-Wen School of Computer Science and Engineering , Southeast University , Nanjing 210096 Jiangsu Institute of Software Quality , Nanjing 210096 Abstract Metamorphic testing is very practical and effective for programs with oracle problems. Much research has been done in this field. Based upon existed methods of metamorphic testing and program path-analysis, the authors first present a set of metamorphic testing criteria for the test with binary metamorphic relations. These criteria define the adequacy of metamorphic test suites at several different levels. Then, three new testing algorithms are given to generate test suites that could satisfy the criteria above. Finally, these algorithms’ performances are fully proved with the technique of mutation analysis. The experiment results show that testing effects are greatly decided by the selection of metamorphic relations and testing criteria, and the algorithm APCEMST could detect faults quickly and exactly with fewer test cases than traditional method. Keywords software testing; metamorphic testing; oracle problem; metamorphic relation; path-coverage criterion 引言 软件测试是一种重要的、不可缺少的软件质量保证技术,用于发现和纠正软件中存在的缺陷和错误。但在很多情况下,测试时存在着oracle问题[1],即测试人员很难构造程序的预期输出,确定执行结果与期望结果是否相同。为了能够有效地解决此类问题, Chen等人提出了蜕变测试 metamorphic testing 的概念[2],该方法通过检查程序的多个执行结果之间的关系来测试程序,不需要构造预期输出。 蜕变测试技术具有三个突出的特点:为了检查程序的执行结果,测试时需要构造蜕变关系[2];为了从多个方面判定程序功能的正确性,测试时通常需要构造多条蜕变关系;为了获得原始测试用例[2],蜕变测试需要与其他测试用例生成方法相结合。 Chen和吴鹏分析了使用特殊值和随机值作为原始用例时的差异[3,4],吴鹏还提出了迭代蜕变测试算法 IMT 以循环地产生原始用例[5],但复杂度较高,我们基于路径分析技术对IMT算法进行了改进[6]。Chen和Mayer还通过实验对比总结出了蜕变关系选取的一般性策略[7, 8];虽然对于蜕变测试技术自身的改进可以提高测试效率,但它经常与其他验证或测试技术结合使用。Chen将蜕变测试与全局符号执行结合提出了一种准验证方法[9]。将蜕变技术与基于缺陷的测试[10]、STECC[11]、基于模型的测试[12]等方法结合,也可以获得高效的测试技术;蜕变测试技术的实用性使得它已

文档评论(0)

1亿VIP精品文档

相关文档