【24h】

Random Testing for Higher-Order, Stateful Programs

机译:高阶有状态程序的随机测试

获取原文
获取原文并翻译 | 示例

摘要

Testing is among the most effective tools available for finding bugs. Still, we know of no automatic technique for generating test cases that expose bugs involving a combination of mutable state and callbacks, even though objects and method overriding set up exactly that combination. For such cases, a test generator must create callbacks or subclasses that aggressively exercise side-effecting operations using combinations of generated objects. This paper presents a new algorithm for randomly testing programs that use state and callbacks. Our algorithm exploits a combination of contracts and environment bindings to guide the test-case generator toward interesting inputs. Our prototype implementation for Racket (formerly PLT Scheme)—which has a Java-like class system, but with first-class classes as well as gbeta-like augmentable methods— uncovered dozens of bugs in a well-tested and widely used text-editor library. We describe our approach in a precise, formal notation, borrowing the techniques used to describe operational semantics and type systems. The formalism enables us to provide a compact and self-contained explanation of the core of our technique without the ambiguity usually present in pseudo-code descriptions.
机译:测试是发现错误的最有效工具之一。尽管如此,我们仍然没有一种自动的技术来生成测试用例,以暴露涉及可变状态和回调组合的错误,即使对象和方法重写恰好设置了这种组合。对于这种情况,测试生成器必须创建回调或子类,以使用生成的对象的组合来积极地执行副作用操作。本文提出了一种用于随机测试使用状态和回调的程序的新算法。我们的算法利用合同和环境绑定的组合来引导测试用例生成器转向有趣的输入。我们针对Racket(以前称为PLT Scheme)的原型实现(具有类似Java的类系统,但具有一流的类以及类似gbeta的可扩展方法)在经过充分测试和广泛使用的文本编辑器中发现了数十个错误图书馆。我们以一种精确的正式符号来描述我们的方法,并借鉴了用于描述操作语义和类型系统的技术。形式主义使我们能够提供对技术核心的紧凑而独立的解释,而不会在伪代码描述中通常出现歧义。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号