2604.10126v2 Apr 11, 2026 cs.SE

MR-Coupler: 함수적 결합 분석을 통한 자동 메타모픽 테스트 생성

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

Songqiang Chen
Songqiang Chen
Citations: 35
h-index: 3
Shing-Chi Cheung
Shing-Chi Cheung
Citations: 157
h-index: 4
Valerio Terragni
Valerio Terragni
Citations: 274
h-index: 9
Congying Xu
Congying Xu
Citations: 28
h-index: 2
Hengcheng Zhu
Hengcheng Zhu
The Hong Kong University of Science and Technology
Citations: 125
h-index: 6
Jiarong Wu
Jiarong Wu
Citations: 81
h-index: 5

메타모픽 테스트(MT)는 소프트웨어 테스트에서 오라클 문제를 해결하는 널리 알려진 기술입니다. 그러나 효과적인 메타모픽 관계(MR)를 구성하는 어려움으로 인해 MT의 활용이 제한됩니다. MR 구성에는 종종 도메인별 지식이나 얻기 어려운 정보가 필요하기 때문입니다. 본 연구에서는 소스 코드에서 쉽게 얻을 수 있는 함수적 결합을 활용하여 MR을 자동으로 구성하고 메타모픽 테스트 케이스(MTC)를 생성하는 새로운 접근 방식을 제안합니다. 저희의 기술인 MR-Coupler는 함수적으로 결합된 메서드 쌍을 식별하고, 대규모 언어 모델을 사용하여 후보 MTC를 생성하며, 테스트 증폭 및 돌연변이 분석을 통해 이를 검증합니다. 특히, 저희는 가능한 메서드 쌍의 비용이 많이 드는 열거를 피하기 위해 세 가지 함수적 결합 특징을 활용하고, 오탐을 줄이기 위한 새로운 검증 메커니즘을 사용합니다. MR-Coupler를 100개의 사람이 작성한 MTC와 50개의 실제 버그에 대해 평가한 결과, 90% 이상의 작업에서 유효한 MTC를 생성하며, 기준 모델에 비해 유효한 MTC 생성량을 64.90% 향상시키고 오탐을 36.56% 줄이는 것으로 나타났습니다. 또한, MR-Coupler가 생성한 MTC는 실제 버그의 44%를 탐지했습니다. 이러한 결과는 함수적 결합을 활용한 자동 MR 구성의 효과를 강조하며, MR-Coupler가 실제 환경에서 MT의 활용을 촉진할 수 있는 잠재력을 보여줍니다. 또한, 향후 연구를 지원하기 위해 관련 도구와 실험 데이터를 공개했습니다.

Original 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.

0 Citations
0 Influential
4.5 Altmetric
22.5 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!