Regular expressions (regexes) permit to describe set of strings using a pattern-based syntax. Writing a correct regex that exactly captures the desired set of strings is difficult, also because a regex is seldom syntactically incorrect, and so it is rare to detect faults at parse time. We propose a fault-based approach for generating tests for regexes. We identify fault classes representing possible mistakes a user can make when writing a regex, and we introduce the notion of distinguishing string, i.e., a string that is able to witness a fault. Then, we provide a tool, based on the automata representation of regexes, for generating distinguishing strings exposing the faults introduced in mutated versions of a regex under test. The basic generation process is improved by two techniques, namely monitoring and collecting. Experiments show that the approach produces compact test suites having a guaranteed fault detection capability, differently from other test generation approaches.

MutRex: A Mutation-Based Generator of Fault Detecting Strings for Regular Expressions / P. Arcaini, A. Gargantini, E. Riccobene - In: 2017 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW)[s.l] : IEEE, 2017. - ISBN 9781509066766. - pp. 87-96 (( Intervento presentato al 10. convegno IEEE International Conference on Software Testing, Verification and Validation (ICSTW) tenutosi a Tokyo nel 2017 [10.1109/ICSTW.2017.23].

MutRex: A Mutation-Based Generator of Fault Detecting Strings for Regular Expressions

P. Arcaini;E. Riccobene
Co-primo
2017

Abstract

Regular expressions (regexes) permit to describe set of strings using a pattern-based syntax. Writing a correct regex that exactly captures the desired set of strings is difficult, also because a regex is seldom syntactically incorrect, and so it is rare to detect faults at parse time. We propose a fault-based approach for generating tests for regexes. We identify fault classes representing possible mistakes a user can make when writing a regex, and we introduce the notion of distinguishing string, i.e., a string that is able to witness a fault. Then, we provide a tool, based on the automata representation of regexes, for generating distinguishing strings exposing the faults introduced in mutated versions of a regex under test. The basic generation process is improved by two techniques, namely monitoring and collecting. Experiments show that the approach produces compact test suites having a guaranteed fault detection capability, differently from other test generation approaches.
specifications
Settore INF/01 - Informatica
2017
Book Part (author)
File in questo prodotto:
File Dimensione Formato  
07899040.pdf

accesso riservato

Tipologia: Publisher's version/PDF
Dimensione 384.83 kB
Formato Adobe PDF
384.83 kB Adobe PDF   Visualizza/Apri   Richiedi una copia
Pubblicazioni consigliate

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2434/584999
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 16
  • ???jsp.display-item.citation.isi??? 8
social impact