Enhancing Mutation Testing Through Grammar Fuzzing and Parse Tree-Driven Mutation Generation

Mutation testing is a technique used to assess the effectiveness of software test suites. It works by deliberately introducing small, controlled changes, called mutations, into the code of the software under test (SUT). A robust and thorough test suite should be able to identify and detect these intentionally seeded errors. The key point is to ensure that the resulting mutant program can still be successfully loaded and executed, without causing compilation or runtime errors. The effectiveness of mutation testing directly depends on the nature and scope of the introduced mutations, as more advanced mutations and even targeted mutations can pose additional challenges to the test suite. This paper presents a novel approach leveraging parse trees and grammar fuzzing to create syntactically valid mutations. By generating a parse tree from the SUT's source code, our method allows precise selection of target nodes and controls mutation granularity through Lexar and parser rules. A custom grammar fuzzer generates new code fragments, which are then semantically validated by a language-specific analyzer to ensure correctness. To address potential compilation issues, we propose selecting deeper parse tree nodes for mutations. Our approach enhances mutation testing precision, flexibility, and automation, ensuring valid and contextually appropriate code mutations.

Authors

Institutions

Publication Details

Published
2024-12-24
DOI
https://doi.org/10.1109/ikt65497.2024.10892655
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing Mutation Testing Through Grammar Fuzzing and Parse Tree-Driven Mutation Generation

M. Khorsandi, Mohammadreza Sharbaf, Alireza Dastmalchi Saei
1 links
Software Testing and Debugging Techniques
article

Enhancing Mutation Testing Through Grammar Fuzzing and Parse Tree-Driven Mutation Generation

M. Khorsandi, Mohammadreza Sharbaf, Alireza Dastmalchi Saei
article en

Abstract

Mutation testing is a technique used to assess the effectiveness of software test suites. It works by deliberately introducing small, controlled changes, called mutations, into the code of the software under test (SUT). A robust and thorough test suite should be able to identify and detect these intentionally seeded errors. The key point is to ensure that the resulting mutant program can still be successfully loaded and executed, without causing compilation or runtime errors. The effectiveness of mutation testing directly depends on the nature and scope of the introduced mutations, as more advanced mutations and even targeted mutations can pose additional challenges to the test suite. This paper presents a novel approach leveraging parse trees and grammar fuzzing to create syntactically valid mutations. By generating a parse tree from the SUT's source code, our method allows precise selection of target nodes and controls mutation granularity through Lexar and parser rules. A custom grammar fuzzer generates new code fragments, which are then semantically validated by a language-specific analyzer to ensure correctness. To address potential compilation issues, we propose selecting deeper parse tree nodes for mutations. Our approach enhances mutation testing precision, flexibility, and automation, ensuring valid and contextually appropriate code mutations.

University of Isfahan (IR)
Openalex Percentile: Top 72%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.