MR-Coupler: Automated Metamorphic Test Generation via Functional Coupling Analysis
Congying Xu, Hengcheng Zhu, Songqiang Chen, Jiarong Wu, Valerio Terragni, and Shing-Chi Cheung

TL;DR
MR-Coupler automates metamorphic test case generation by analyzing functional coupling in source code, significantly improving validity and bug detection in software testing.
Contribution
It introduces a novel method leveraging functional coupling features and large language models to automatically construct effective metamorphic relations.
Findings
Generates valid metamorphic test cases for over 90% of tasks.
Improves valid MTC generation by 64.90%.
Detects 44% of real bugs.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
