Back to list
MR-Coupler: 機能結合解析に基づく自動化されたメタモルフィックテスト生成
MR-Coupler: Automated Metamorphic Test Generation via Functional Coupling Analysis
Translated: 2026/4/20 11:19:10
Japanese Translation
arXiv:2604.10126v2 Announce Type: replace-cross
メタモルフィックテスト(MT)は、ソフトウェアテストにおけるオーケル(答え合わせ)問題を緩和する広く認識された手法です。しかし、その採用は、効率的なメタモルフィック関係(MR)を構築する難しさに阻まれており、しばしばドメイン固有または入手困難な知識が必要となります。本稿では、ソースコードに容易に入手可能な機能結合を利活用し、MR を自動的に構築し、メタモルフィックテストケース(MTC)を生成するための新たなアプローチを提案します。我々の手法 MR-Coupler は、機能結合したメソッドのペアを特定し、大規模言語モデル(LLM)を使用して候補 MTC を生成し、テスト増幅および変異分析を通じた検証を行います。特に、高価なメソッドペアの列挙を避けるために 3 つの機能結合特性を、そして偽陽性を減らすために新規の検証機構を活用しています。
MR-Coupler を 100 つの人間作成の MTC と 50 つの実際のバグに対して評価した結果、我々は MR-Coupler がタスクの 90% 以上に有効な MTC を生成し、ベースラインに対して有効な MTC 生成を 64.90% 改善し、偽陽性を 36.56% 減少させることを示しました。さらに、MR-Coupler によって生成された MTC は実際のバグの 44% を検出しました。我々の結果は、自動化された MR 構築において機能結合の活用が効果的であることを示唆しており、MR-Coupler が MT の実践的採用を促進するポテンシャルを持つことを示しています。我々はまた、将来的な研究をサポートするためにツールおよび実験データを公開しています。
Original Content
arXiv:2604.10126v2 Announce Type: replace-cross
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 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.