首页> 外文会议>Software Testing, Verification and Validation Workshops, 2009. ICSTW '09 >Assertion-Driven Development: Assessing the Quality of Contracts Using Meta-Mutations
【24h】

Assertion-Driven Development: Assessing the Quality of Contracts Using Meta-Mutations

机译:断言驱动的开发:使用元突变评估合同的质量

获取原文

摘要

Agile development methods have gained momentum in the last few years and, as a consequence, test-driven development has become more prevalent in practice. However, test cases are not sufficient for producing dependable software and we rather advocate approaches that emphasize the use of assertions or contracts over that of test cases. Yet, writing self-checks in code has been shown to be difficult and is itself prone to errors. A standard technique to specify runtime properties is design-by contract(DbC). But how can one test if the contracts themselves are sensible and sufficient? We propose a measure to quantify the goodness of contracts (or assertions in a broader sense). We introduce meta-mutations at the source code level to simulate common programmer errors that the self-checks are supposed to detect. We then use random mutation testing to determine a lower and upper bound on the detectable mutations and compare these bounds with the number of mutants detected by the contracts. Contracts are considered ldquogoodrdquo if they detect a certain percentage of the detectable mutations.We have evaluated our tools on Java classes with contracts specified using the Java Modeling Language (JML). We have additionally tested the contract quality of 19 implementations, written independently by students, based on the same specification.
机译:在过去的几年中,敏捷开发方法得到了发展,因此,测试驱动的开发在实践中变得越来越普遍。但是,测试用例不足以产生可靠的软件,我们主张提倡使用断言或契约而不是测试用例的方法。然而,事实证明,用代码编写自检非常困难,而且本身容易出错。指定运行时属性的标准技术是按合同设计(DbC)。但是,如何检验合同本身是否合理和充分呢?我们提出了一种量化合同(或广义上的断言)的好处的措施。我们在源代码级别引入了元突变,以模拟应该由自我检查检测到的常见程序员错误。然后,我们使用随机突变测试来确定可检测突变的上限和下限,并将这些界限与通过合同检测到的突变体数量进行比较。如果合同检测到一定百分比的可检测突变,则将其视为“良好合同”。我们已经对使用Java建模语言(JML)指定的合同的Java类的工具进行了评估。我们还根据相同的规范测试了由学生独立编写的19种实施的合同质量。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号