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

雕刻参数化单元测试

Carving Parameterized Unit Tests

Alexander Kampmann, Andreas Zeller

摘要:

我们提出了一种方法来自动提取(“雕刻”)参数化单元测试从系统执行。单元测试执行与系统测试相同的功能,但由于它们直接调用功能,因此执行速度要快得多;此外,通过参数化,它们可以使用各种随机选择的输入值执行功能。如果单元级测试失败,我们将其提升到系统级,以确保故障可以在那里重现。因此,我们的方法允许将测试工作集中在选定的模块上,同时仍然避免错误警报:在我们的实验中,为单个函数运行参数化单元测试平均比运行系统测试快30倍。

英文摘要:

We present a method to automatically extract ("carve") parameterized unit tests from system executions. The unit tests execute the same functions as the system tests they are carved from, but can do so much faster as they call functions directly; furthermore, being parameterized, they can execute the functions with a large variety of randomly selected input values. If a unit-level test fails, we lift it to the system level to ensure the failure can be reproduced there. Our method thus allows to focus testing efforts on selected modules while still avoiding false alarms: In our experiments, running parameterized unit tests for individual functions was, on average, 30~times faster than running the system tests they were carved from.

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

↑