【24h】

An Empirical Evaluation of Assertions as Oracles

机译:对甲骨文断言的实证评估

获取原文
获取外文期刊封面目录资料

摘要

In software testing, an oracle determines whether a test case passes or fails by comparing output from the program under test with the expected output. Since the identification of faults through testing requires that the bug is both exercised and the resulting failure is recognized, it follows that oracles are critical to the efficacy of the testing process. Despite this, there are few rigorous empirical studies of the impact of oracles on effectiveness. In this paper, we report the results of one such experiment in which we exercise seven core Java classes and two sample programs with branch-adequate, input only(i.e., no oracle) test suites and collect the failures observed by different oracles. For faults, we use synthetic bugs created by the muJava mutation testing tool. In this study we evaluate two oracles: (1) the implicit oracle (or "null oracle") provided by the runtime system, and (2) runtime assertions embedded in the implementation (by others) using the Java Modeling Language. The null oracle establishes a baseline measurement of the potential benefit of rigorous oracles, while the assertions represent a more rigorous approach that is sometimes used in practice. The results of our experiments are interesting. First, on a per-method basis, we observe that the null oracle catches less than 11% of the faults, leaving more than 89% uncaught. Second, we observe that the runtime assertions in our subjects are effective at catching about 53% of the faults not caught by null oracle. Finally, by analyzing the data using data mining techniques, we observe that simple, code-based metrics can be used to predict which methods are amenable to the use of assertion-based oracles with a high degree of accuracy.
机译:在软件测试中,oracle通过将被测程序的输出与预期输出进行比较来确定测试用例是否通过。由于通过测试来识别故障需要同时执行该错误并识别出导致的故障,因此,预言对于测试过程的有效性至关重要。尽管如此,很少有关于甲骨文对有效性的影响的严格的经验研究。在本文中,我们报告了这样一个实验的结果,在该实验中,我们练习了七个核心Java类和两个具有分支功能的示例程序(仅输入(即没有oracle))测试套件,并收集了由不同oracle观察到的故障。对于错误,我们使用由muJava突变测试工具创建的合成错误。在这项研究中,我们评估了两个预言:(1)由运行时系统提供的隐式预言(或“空预言”),以及(2)使用Java建模语言(由其他人)嵌入在实现中的运行时断言。空预言建立了严格预言潜在收益的基准度量,而断言则代表了有时在实践中使用的更为严格的方法。我们的实验结果很有趣。首先,基于每个方法,我们观察到空oracle捕获的故障少于11%,而未捕获的故障超过89%。其次,我们观察到主题中的运行时断言可以有效地捕获约53%的未由空oracle捕获的故障。最后,通过使用数据挖掘技术分析数据,我们观察到可以使用基于代码的简单度量标准来预测哪些方法适合使用基于断言的预言机,并且准确性很高。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号