[论文解读] Empirical Evaluation of Mutation-based Test Prioritization Techniques
本文提出了一种基于多样性感知的变异体突变测试用例优先级排序技术,该技术根据测试用例区分变异体之间差异的能力进行排序,而不仅仅是与原始程序的差异。在352个真实缺陷和553,477个测试用例上的实证评估表明,通过混合贪婪方法结合变异体杀死和区分标准,其性能优于单目标方法,但没有单一技术在所有缺陷上均占优。
We propose a new test case prioritization technique that combines both mutation-based and diversity-based approaches. Our diversity-aware mutation-based technique relies on the notion of mutant distinguishment, which aims to distinguish one mutant's behavior from another, rather than from the original program. We empirically investigate the relative cost and effectiveness of the mutation-based prioritization techniques (i.e., using both the traditional mutant kill and the proposed mutant distinguishment) with 352 real faults and 553,477 developer-written test cases. The empirical evaluation considers both the traditional and the diversity-aware mutation criteria in various settings: single-objective greedy, hybrid, and multi-objective optimization. The results show that there is no single dominant technique across all the studied faults. To this end, ev{we we show when and the reason why each one of the mutation-based prioritization criteria performs poorly, using a graphical model called Mutant Distinguishment Graph (MDG) that demonstrates the distribution of the fault detecting test cases with respect to mutant kills and distinguishment.
研究动机与目标
- 研究基于变异体的测试用例优先级排序在同时使用传统变异体杀死标准与新型多样性感知变异体区分标准时的有效性与成本。
- 评估单目标贪婪、混合与多目标优先级排序策略在两种标准下的性能表现。
- 利用新型可视化分析模型,识别每种优先级排序标准表现不佳的时机与原因。
- 为结合基于变异体与基于多样性的标准以提升回归测试中的早期故障检测提供洞见。
提出的方法
- 提出一种新的基于变异体的优先级排序标准,专注于区分每个变异体与所有其他变异体的行为,而不仅仅是与原始程序的对比。
- 引入变异体区分图(MDG),一种可视化模型,用于分析测试用例、变异体杀死与变异体区分之间的关系,以支持故障检测分析。
- 采用三种优先级排序策略:贪婪(单目标)、混合(结合杀死与区分)和多目标(同时优化两者)。
- 使用Defects4J基准测试集,包含352个真实缺陷和553,477个开发人员编写的测试用例,以评估有效性与执行成本。
- 通过故障检测率与故障发现时间衡量有效性,通过优先级排序执行时间衡量成本。
- 采用NSGA-II与TAEA多目标优化算法,探索杀死与区分变异体之间的权衡。
实验结果
研究问题
- RQ1与基于传统变异体杀死的优先级排序相比,所提出的多样性感知变异体优先级排序的有效性如何?
- RQ2在真实世界缺陷中,哪种优先级排序策略——贪婪、混合或多目标——能实现最佳的故障检测性能?
- RQ3变异体杀死优先级排序在何种条件下会失效,原因是什么?
- RQ4同时结合杀死与区分变异体对测试用例排序的有效性有何影响?
- RQ5与贪婪和混合方法相比,多目标优先级排序的计算成本如何?
主要发现
- 结合变异体杀死与区分标准的混合贪婪方法在故障检测性能上表现最佳,优于两种单目标策略。
- 没有一种优先级排序技术在全部352个缺陷上始终占优;性能显著依赖于缺陷特征。
- 多目标优先级排序每测试套件约需37分钟,而贪婪与混合方法均少于8秒,表明存在较高的成本-收益权衡。
- 仅使用变异体区分标准并不优于仅使用杀死标准,但两者的结合显著提升了故障检测的有效性。
- MDG可视化模型表明,仅早期杀死变异体并不能保证早期故障检测,因为部分能检测故障的测试用例无法区分变异体。
- 对于至少88.9%和77.8%的缺陷,基于变异体的优先级排序优于基于覆盖率或随机的优先级排序。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。