PSALM:在变异测试中应用比例采样策略
PSALM: applying Proportional SAmpLing strategy in Metamorphic testing
AI总结:
PSALM 是一种在变异测试中应用比例采样策略的改进方法,通过理论证明和实证研究展示了其在源测试用例和变异组选择上的有效性。
摘要:
变异测试(MT)通过在多个测试执行之间检查变异关系(MRs)来缓解 oracle 问题。MT 的故障检测有效性不仅受 MRs 的选择和质量影响,还受源测试用例和变异组(MGs)的选择方式影响。尽管大量研究集中在设计、生成和验证 MRs 上,系统性的源测试用例选择和 MGs 选择方法仍鲜有探索。虽然比例采样策略(PSS)在传统测试中提供强理论保证,但其假设无法直接应用于 MT,因为选择域、测试单元和失败分布存在差异。本文提出 PSALM,将 PSS 适应到 MT 用于源测试用例选择和 MGs 选择。我们正式证明 PSALM 在源测试用例和 MGs 选择领域无论如何划分均不劣于随机选择。我们进一步确定了在何种条件下应用 PSALM 进行源测试用例选择和 MGs 选择会产生相同效果。对八个被测程序和 184 个突变体的综合实证研究显示,结果与我们的理论分析一致,且 PSALM 在现有选择策略如 ART 和 MT-ART 上表现更优。这些结果表明,PSALM 提供了在 MT 中理论严谨且实际有效的选择策略。
英文摘要:
Metamorphic testing (MT) alleviates the oracle problem by checking metamorphic relations (MRs) across multiple test executions. The fault detection effectiveness of MT is influenced not only by the choice and quality of MRs, but also by how source test cases and metamorphic groups (MGs) are selected. While substantial research has focused on designing, generating, and validating MRs, systematic methods for source test case selection and MG selection remain largely unexplored. Although the Proportional Sampling Strategy (PSS) provides strong theoretical guarantees in traditional testing, its assumptions cannot be directly applied in MT due to differences in selection domains, test units, and failure distributions. This paper proposes PSALM, an adaptation of PSS to MT for both source test case selection and MG selection. We formally prove that PSALM is never inferior to random selection regardless of how the source test case and MG domains are partitioned. We further identify the conditions under which applying PSALM to source test case selection and MG selection yields identical effectiveness. A comprehensive empirical study on eight subject programs and 184 mutants shows that the results are consistent with our theoretical analysis and that PSALM generally performs more effectively than existing selection strategies such as ART and MT-ART. These results demonstrate that PSALM provides a theoretically grounded and practically effective selection strategy for MT.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。