首页> 外文会议>IFIP WG 6.1 international conference on testing software and systems >Reducing the Cost of Grammar-Based Testing Using Pattern Coverage
【24h】

Reducing the Cost of Grammar-Based Testing Using Pattern Coverage

机译:使用模式覆盖率降低基于语法的测试成本

获取原文

摘要

In grammar-based testing, context-free grammars may be used to generate relevant test inputs for language processors, or meta programs, such as programming language compilers, refactoring tools, and implementations of software quality metrics. This technique can be used to test these meta programs, but the amount of sentences, and syntax trees thereof, which needs to be generated to obtain reasonable coverage of the input language is exponential. Pattern matching is a programming language feature used often when writing meta programs. Pattern matching helps because it automates the frequently occurring task of detecting shapes in, and extracting information from syntax trees. However, meta programs which contain many patterns are difficult to test using only randomly generated sentences from grammar rules. The reason is that statistically it is uncommon to directly generate sentences which accidentally match the patterns in the code. To solve this problem, in this paper we extract information from the patterns in the code of meta programs to guide the sentence generation process. We introduce a new coverage criterion, called Pattern Coverage, which focuses on providing a test strategy to reduce the amount of test necessary cases, while covering the relevant parts of the meta program. An initial experimental evaluation is presented and the result is compared with traditional grammar-based testing.
机译:在基于语法的测试中,无上下文语法可用于为语言处理器或元程序(例如编程语言编译器,重构工具和软件质量度量的实现)生成相关的测试输入。该技术可以用于测试这些元程序,但是为生成合理的输入语言覆盖范围而需要生成的句子及其语法树的数量是指数级的。模式匹配是编写元程序时经常使用的一种编程语言功能。模式匹配有帮助,因为它可以自动执行经常发生的任务,即检测语法中的形状以及从语法树中提取信息。但是,包含许多模式的元程序很难仅使用语法规则中随机生成的语句进行测试。原因是从统计上讲,直接生成意外地与代码中的模式匹配的语句并不常见。为了解决这个问题,本文从元程序代码中的模式中提取信息,以指导句子的生成过程。我们引入了一个新的覆盖标准,称为模式覆盖,该标准着重于提供一种测试策略以减少测试必要案例的数量,同时覆盖元程序的相关部分。提出了初步的实验评估,并将结果与​​传统的基于语法的测试进行了比较。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号