首页> 外文期刊>Software Testing, Verification and Reliability >Fault-based test generation for regular expressions by mutation
【24h】

Fault-based test generation for regular expressions by mutation

机译:基于错误的基于突变的正则表达式测试生成

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

摘要

Regular expressions are used to characterize sets of strings (ie, languages) using a pattern-based syntax. They are applied in different contexts as, for example, data validation in Web forms. However, writing a regular expression that exactly captures the desired set of strings could be particularly difficult, and techniques are sought to validate regular expressions or test their use in applications. A common means to regular expression validation and testing is the generation of a set of labelled strings (ie, strings together with their evaluation). We here propose a fault-based approach for generating strings usable as tests for regular expressions. We define some fault classes representing mistakes that could be made when writing a regular expression, and we introduce the notion of distinguishing string, ie, a string that is able to expose a fault. Given a regular expression, our approach generates a test suite composed of distinguishing strings that are able to detect possible faults in the regular expression. We present different versions of the approach, which provide different results in terms of test suite size and generation time. Experiments show that the proposed approach can generate compact test suites and that, using suitable optimizations, the generation time is reasonable. Exploiting the proposed fault classes, we use the notion of mutation score to assess the ability of a generic set of strings in exposing possible faults contained in the regular expression under test. A comparison with other test generation tools in terms of mutation score, size, and generation time shows the advantages and limits of our approach.
机译:正则表达式用于使用基于模式的语法来表征字符串集(即语言)。它们被应用在不同的上下文中,例如,Web表单中的数据验证。但是,编写正则表达式以准确捕获所需的字符串集可能特别困难,并且正在寻求一些技术来验证正则表达式或测试其在应用程序中的使用。正则表达式验证和测试的一种常用方法是生成一组标记的字符串(即,字符串及其评估)。我们在这里提出了一种基于故障的方法,用于生成可用作正则表达式测试的字符串。我们定义了一些故障类别,表示编写正则表达式时可能会犯的错误,并引入了区分字符串的概念,即能够暴露故障的字符串。给定一个正则表达式,我们的方法将生成一个由区分字符串组成的测试套件,这些字符串能够检测到正则表达式中可能存在的错误。我们介绍了该方法的不同版本,它们在测试套件的大小和生成时间方面提供了不同的结果。实验表明,该方法可以生成紧凑的测试套件,并且通过适当的优化,生成时间是合理的。利用提议的故障类别,我们使用突变分数的概念来评估通用字符串集暴露被测正则表达式中可能出现的故障的能力。在变异分数,大小和生成时间方面与其他测试生成工具进行比较,显示了我们方法的优势和局限性。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号