EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

MR-Coupler: Automated Metamorphic Test Generation via Functional Coupling Analysis

Congying Xu, Hengcheng Zhu, Songqiang Chen, Jiarong Wu, Valerio Terragni, Shing-Chi Cheung

Proceedings of the ACM on Software Engineering · 30.06.2026 · 3 (FSE) · 4690-4713

DOI: 10.1145/3808213 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the ACM on Software Engineering, online erschienen am 30.06.2026. Verfasst von Congying Xu und 5 weiteren Autor:innen. Die Arbeit wurde bisher 2-mal zitiert (Crossref) und nennt 77 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0). Gefördert von: National Natural Science Foundation of China, Research Grants Council, University Grants Committee.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Metamorphic testing (MT) is a widely recognized technique for alleviating the oracle problem in software testing. However, its adoption is hindered by the difficulty of constructing effective metamorphic relations (MRs), which often require domain-specific or hard-to-obtain knowledge. In this work, we propose a novel approach that leverages the functional coupling between methods, which is readily available in source code, to automatically construct MRs and generate metamorphic test cases (MTCs). Our technique, MR-Coupler, identifies functionally coupled method pairs, employs large language models to generate candidate MTCs, and validates them through test amplification and mutation analysis. In particular, we leverage three functional coupling features to avoid expensive enumeration of possible method pairs, and a novel validation mechanism to reduce false alarms. Our evaluation of MR-Coupler on 100 human-written MTCs and 50 real-world bugs shows that it generates valid MTCs for over 90% of tasks, improves valid MTC generation by 64.90%, and reduces false alarms by 36.56% compared to baselines. Furthermore, the MTCs generated by MR-Coupler detect 44% of the real bugs. Our results highlight the effectiveness of leveraging functional coupling for automated MR construction and the potential of MR-Coupler to facilitate the adoption of MT in practice. We also released the tool and experimental data to support future research.

Förderung

  • National Natural Science Foundation of China
  • Research Grants Council, University Grants Committee

Zitieren

APA

Xu, C., Zhu, H., Chen, S., Wu, J., Terragni, V., & Cheung, S. (2026). MR-Coupler: Automated Metamorphic Test Generation via Functional Coupling Analysis. Proceedings of the ACM on Software Engineering, 3(FSE), 4690-4713. https://doi.org/10.1145/3808213

Vancouver

Xu C, Zhu H, Chen S, Wu J, Terragni V, Cheung S. MR-Coupler: Automated Metamorphic Test Generation via Functional Coupling Analysis. Proceedings of the ACM on Software Engineering. 2026;3(FSE):4690-4713. doi:10.1145/3808213

BibTeX
@article{Xu2026,
  author = {Xu, Congying and Zhu, Hengcheng and Chen, Songqiang and Wu, Jiarong and Terragni, Valerio and Cheung, Shing-Chi},
  title = {MR-Coupler: Automated Metamorphic Test Generation via Functional Coupling Analysis},
  journal = {Proceedings of the ACM on Software Engineering},
  year = {2026},
  volume = {3},
  number = {FSE},
  pages = {4690--4713},
  doi = {10.1145/3808213}
}
Kostenlos starten →