# Graph neural network-based mutation-aware regression test ordering using code dependency graphs and execution traces

**Authors:** S Sowmyadevi, Anna Alphy

PMC · DOI: 10.1016/j.mex.2025.103782 · MethodsX · 2025-12-25

## TL;DR

This paper introduces a new method using graph neural networks to prioritize regression tests, improving fault detection and efficiency in software testing.

## Contribution

A novel GNN-based framework that integrates static and dynamic code features for mutation-aware test prioritization.

## Key findings

- The proposed method achieves an average APFD of 88.9% and mutation score of 84.6% on benchmark datasets.
- Removing execution traces or mutation characteristics reduces APFD by 5–8%, highlighting their importance.
- GNN embeddings effectively cluster fault-related test cases for interpretable prioritization.

## Abstract

The mutation-aware test prioritisation system in this paper uses Graph Neural Networks (GNNs) to combine static program structure, dynamic execution traces, and mutation coverage into a hybrid graph representation to enhance regression testing. The framework embeds higher-order dependencies in test cases using GCN, GAT, and GraphSAGE variations and ranks them using a multi-objective optimisation function that balances fault detection, execution cost, and mutation coverage. On benchmark datasets like Defects4J and ManySStuBs4J, the proposed approach consistently outperforms traditional baselines (coverage-based APFD = 72.4 %, cost-based = 74.5 %) and ML baselines (LSTM = 80.1 %, RL = 82.7 %), achieving an average APFD of 88.9 % and mutation score of 84.6 % with a 16.1-second execution overhead. Statistical tests (Wilcoxon signed-rank, p < 0.05) indicate the robustness of these gains. Ablation experiments show that removing execution traces or mutation characteristics reduces APFD by 5–8 %, emphasising their relevance. Qualitative research shows that GNN embeddings cluster fault-related test cases for interpretable prioritisation. The suggested paradigm for contemporary regression testing is scalable, accurate, and mutation-driven.•Multi-Tiered Graph-Based Architecture: The method transforms raw program artifacts (codebase, mutants, test traces) into Program Dependence Graphs and Call Graphs, where nodes represent program elements and edges capture dependencies enriched with runtime characteristics.•GNN-Powered Multi-Objective Optimization: Core innovation uses Graph Neural Networks (GCN, GAT, GraphSAGE) to create enriched embeddings through iterative neighborhood aggregation, feeding into a scoring function that balances fault detection potential, execution cost, and mutation coverage.•Superior Validated Performance: Achieves 88.9 % APFD compared to 82.7 % for best baseline methods on real-world datasets, with statistical significance confirmed through Wilcoxon signed-rank tests across multiple evaluation metrics.

Multi-Tiered Graph-Based Architecture: The method transforms raw program artifacts (codebase, mutants, test traces) into Program Dependence Graphs and Call Graphs, where nodes represent program elements and edges capture dependencies enriched with runtime characteristics.

GNN-Powered Multi-Objective Optimization: Core innovation uses Graph Neural Networks (GCN, GAT, GraphSAGE) to create enriched embeddings through iterative neighborhood aggregation, feeding into a scoring function that balances fault detection potential, execution cost, and mutation coverage.

Superior Validated Performance: Achieves 88.9 % APFD compared to 82.7 % for best baseline methods on real-world datasets, with statistical significance confirmed through Wilcoxon signed-rank tests across multiple evaluation metrics.

Image, graphical abstract

## Full-text entities

- **Genes:** TTC41P (tetratricopeptide repeat domain 41, pseudogene) [NCBI Gene 253724] {aka GNN, GNNP}
- **Chemicals:** GCN (-)
- **Species:** Homo sapiens (human, species) [taxon 9606], Glomus sp. NN (species) [taxon 558158]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12808596/full.md

## Figures

9 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12808596/full.md

## References

16 references — full list in the complete paper: https://tomesphere.com/paper/PMC12808596/full.md

---
Source: https://tomesphere.com/paper/PMC12808596