一句话:提出融合CodeBLEU、METEOR与ROUGE-L的复合指标CTSES,更准确地评估LLM对自动生成单元测试的重构质量。
自动生成的单元测试常具备高覆盖率,但可读性与可维护性较差,因此越来越多工作用大语言模型(LLM)对其进行重构。然而,如何评估这类重构仍很困难:现有指标要么把有益的编辑判为劣化,要么完全忽略可读性。为此,作者提出复合指标CTSES,将CodeBLEU、METEOR与ROUGE-L组合起来,同时权衡语义保持、可读性与结构相似性。在Defects4J与SF110上收集的5000多次LLM重构实验表明,CTSES能减少假阴性,并给出比单一指标更可解释的评估结果。
Large Language Models (LLMs) are increasingly used to refactor automatically generated unit tests, which often achieve high coverage but suffer from poor readability and maintainability. Evaluating such refactorings remains challenging, as existing metrics either penalize beneficial edits or overlook readability. We introduce CTSES, a composite metric combining CodeBLEU, METEOR, and ROUGE-L to balance semantics, readability, and structure. Experiments on 5,000+ refactorings from Defects4J and SF110 show that CTSES reduces false negatives and provides more interpretable evaluation.
@inproceedings{paperbot11605,
title = {Evaluating LLM-Based Test Refactoring with a Behavior-Preserving Composite Metric},
author = {Wendkûuni C. Ouédraogo and Yinghua Li and Xueqi Dang and Paweł Borsukiewicz and Xin Zhou and Anıl Koyuncu and Jacques Klein and David Lo and Tegawendé F. Bissyandé},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3774748.3795657}
}