arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2501.04890cs.SE
收藏

评估开发者编写的 Java 单元测试用例归约——一项复现研究

Evaluating Developer-written Unit Test Case Reduction for Java -- A Replication Study

Tuan D Le, Brandon Wilber, Arpit Christi

AI总结:

本研究使用 ReduJavator 在 Defects4J 缺陷和变异体上复现 ReduSharptor 研究,证实 Java 单元测试归约中叶节点被大量移除,但未能确认叶节点移除概率更高。

摘要:

失败测试用例归约可以促进高效调试,因为开发者可能无需观察与诱发失败无关的组件。失败测试用例归约还可以提高故障定位的效率。这些考量促使研究者研究归约过程、归约输出以及被移除的实体。Christi 等人使用名为 ReduSharptor 的工具研究了 C# 测试的归约。他们将测试视为抽象语法树(AST)。在此基础上,他们依据 AST 的叶节点和非叶节点研究了归约结果及被移除的实体。他们声称:(1)叶节点被大量移除;(2)其被移除的概率略高于非叶节点。我们使用另一种针对 Java 单元测试的测试用例归约工具 ReduJavator 复现了他们的结果。我们利用 Defects4J 数据库中随机选择的 30 个缺陷以及 6 个开源项目的 30 个变异体来评估测试归约。我们的结果证实了他们的第一项主张:叶节点被大量移除。对于第二项主张,我们的结果尚无定论;我们无法证实非叶节点的移除概率更高。

英文摘要:

Abstract: Failing test case reduction can promote efficient debugging because a developer may not need to observe components that are not relevant to inducing failure. Failing test case reduction can also improve the efficiency of fault localization. These considerations have prompted researchers to study the reduction process, the reduction output, and the removed entities. Christi et al. studied test reduction using a tool called ReduSharptor for C# tests. They considered the test to be an Abstract Syntax Tree (AST). Based on that, they studied the reduction outcome and removed entities in terms of Leaf nodes and Non-Leaf nodes of the AST. They claimed that (1) leaf nodes are removed in large numbers, and (2) the probability of removal is slightly higher than non-leaf nodes. We replicate their results using a different test case reduction tool, ReduJavator, for Java unit tests. We evaluate test reduction using 30 randomly chosen bugs from the Defects4J database and 30 mutants for 6 open-source projects. Our results confirm their first claim: leaf nodes are removed in large numbers. Our results are inconclusive regarding their second claim; we cannot confirm that the probability of removal is higher for non-leaf nodes.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑