首页> 外文会议>Software Testing Verification and Validation, 2009. ICST '09 >Using JML Runtime Assertion Checking to Automate Metamorphic Testing in Applications without Test Oracles
【24h】

Using JML Runtime Assertion Checking to Automate Metamorphic Testing in Applications without Test Oracles

机译:使用JML运行时断言检查在没有测试Oracle的应用程序中自动进行变形测试

获取原文

摘要

It is challenging to test applications and functions for which the correct output for arbitrary input cannot be known in advance, e.g. some computational science or machine learning applications. In the absence of a test oracle, one approach to testing these applications is to use metamorphic testing: existing test case input is modified to produce new test cases in such a manner that, when given the new input, the application should produce an output that can be easily be computed based on the original output. That is, if input x produces output f(x), then we create input x' such that we can predict f(x') based on f(x); if the application or function does not produce the expected output, then a defect must exist, and either f(x) or f(x') (or both) is wrong. By using metamorphic testing, we are able to provide built-in "pseudo-oracles" for these so-called "nontestable programs" that have no test oracles.In this paper, we describe an approach in which a function's metamorphic properties are specified using an extension to the Java Modeling Language (JML), a behavioral interface specification language that is used to support the "design by contract" paradigm in Java applications. Our implementation, called Corduroy, pre-processes these specifications and generates test code that can be executed using JML runtime assertion checking, for ensuring that the specifications hold during program execution. In addition topresenting our approach and implementation, we also describe our findings from case studies in which we apply our technique to applications without test oracles.
机译:测试无法事先知道任意输入的正确输出的应用和功能具有挑战性。一些计算科学或机器学习应用程序。在没有测试Oracle的情况下,测试这些应用程序的一种方法是使用变态测试:修改现有测试用例的输入以产生新的测试用例,以使得在给定新的输入时,应用程序应产生一个输出,以便可以根据原始输出轻松计算。也就是说,如果输入x产生输出f(x),则我们创建输入x',以便我们可以基于f(x)预测f(x');如果应用程序或函数未产生预期的输出,则必须存在缺陷,并且f(x)或f(x')(或两者)错误。通过使用变质测试,我们能够为没有测试预言的所谓“不可测试程序”提供内置的“伪预言”。在本文中,我们描述了一种方法,其中使用Java建模语言(JML)的扩展,它是一种行为接口规范语言,用于支持Java应用程序中的“按合同设计”范式。我们的实现称为Corduroy,对这些规范进行预处理,并生成可使用JML运行时断言检查执行的测试代码,以确保规范在程序执行期间保持不变。除了介绍我们的方法和实现之外,我们还描述了案例研究中的发现,在案例研究中,我们将技术应用于没有测试预言的应用程序中。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号