[论文解读] Assessing Test Case Prioritization on Real Faults and Mutants
本研究在 Defects4J 中的真实缺陷以及三万五千多个变异体上评估了测试用例优先级(TCP)技术,发现基于变异体的性能评估通常会将真实场景下的有效性高估约20%,尤其是在包含平凡变异体和被包含变异体时。关键的是,变异体上 TCP 技术的相对排名并不能可靠地预测其在真实缺陷上的排名,这挑战了基于变异体评估 TCP 研究的有效性。
Test Case Prioritization (TCP) is an important component of regression testing, allowing for earlier detection of faults or helping to reduce testing time and cost. While several TCP approaches exist in the research literature, a growing number of studies have evaluated them against synthetic software defects, called mutants. Hence, it is currently unclear to what extent TCP performance on mutants would be representative of the performance achieved on real faults. To answer this fundamental question, we conduct the first empirical study comparing the performance of TCP techniques applied to both real-world and mutation faults. The context of our study includes eight well-studied TCP approaches, 35k+ mutation faults, and 357 real-world faults from five Java systems in the Defects4J dataset. Our results indicate that the relative performance of the studied TCP techniques on mutants may not strongly correlate with performance on real faults, depending upon attributes of the subject programs. This suggests that, in certain contexts, the best performing technique on a set of mutants may not be the best technique in practice when applied to real faults. We also illustrate that these correlations vary for mutants generated by different operators depending on whether chosen operators reflect typical faults of a subject program. This highlights the importance, particularly for TCP, of developing mutation operators tailored for specific program domains.
研究动机与目标
- 探究 TCP 技术在变异体上的表现是否能可靠反映其在真实世界软件缺陷上的表现。
- 评估基于变异体的 TCP 评估在多大程度上可被视为实际测试场景的代表。
- 识别影响变异体对真实缺陷代表性的重要因素,如变异体类型、程序特性及变异算子。
- 评估不同指标(APFD 与 APFDc)对变异体与真实缺陷检测性能相关性的影响。
- 倡导开发面向特定领域的、基于故障模型的变异算子,以提升 TCP 评估的真实性。
提出的方法
- 实现了八种广泛研究的 TCP 技术,并将其应用于 Defects4J 数据集中 357 个真实缺陷以及使用 Pit 生成的三万五千多个变异体。
- 采用两种标准指标(APFD(平均缺陷检测百分比)与 APFDc(考虑成本的 APFD))衡量性能,并在真实缺陷与变异体之间进行比较。
- 将变异体分类为平凡、被包含以及由不同变异算子(如算术、布尔、返回等)生成的类型,分析其对性能相关性的影响。
- 通过统计分析评估五套 Java 系统中 TCP 技术在变异体与真实缺陷上的排名相关性。
- 评估变异体耦合性及算子类型对变异体相对于真实缺陷代表性的影响。
- 基于领域特定的故障建模与定制化变异算子,提出未来工作的框架,以提升评估的真实性。
实验结果
研究问题
- RQ1TCP 技术在变异体上的表现与在真实世界缺陷上的表现之间的相关性有多大?
- RQ2不同变异算子如何影响变异体在评估 TCP 技术时的代表性?
- RQ3性能指标的选择(APFD 与 APFDc)是否会影响变异体与真实缺陷检测性能之间的相关性?
- RQ4程序特定的特性如何影响基于变异体的 TCP 评估的可靠性?
- RQ5定制化的变异算子能否在实践中提升 TCP 评估的真实性?
主要发现
- 使用 APFD 的基于变异体的 TCP 评估,平均会将真实缺陷检测性能高估约 20%,尤其在包含平凡和被包含变异体时更为明显。
- 在去除平凡和被包含变异体后,变异体上的性能平均略低于真实缺陷检测性能约 3%,表明代表性有所改善。
- TCP 技术在变异体上的相对排名与在真实缺陷上的排名之间缺乏一致性相关性,且这种缺乏相关性在不同被测程序间差异显著。
- APFD 的变异体与真实缺陷检测性能相关性较弱,而 APFDc 的相关性中等至强,表明 APFDc 更适合用于基于变异体的评估。
- 不同变异算子产生的变异体代表性水平不一,性能相关性取决于程序类型与算子类型。
- 静态 TCP 技术在真实缺陷上的表现略优于动态方法,但差异无统计显著性,表明在实践中两者无明显主导优势。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。