论文标题

Reassert:坚定生成的深度学习

ReAssert: Deep Learning for Assert Generation

论文作者

White, Robert, Krinke, Jens

论文摘要

自动生成的测试代码可以减少构建软件所需的时间和精力,同时增加其正确性和鲁棒性。在本文中,我们介绍了重新说明,这是一种自动生成Junit测试断言的方法,该方法比以前的工作更少的限制,产生更准确的断言。这是通过单独定位项目,使用精确的代码到测试可追溯性来实现的,并通过直接从测试中进行断言语句,而无需首先编写无主张测试。我们还利用词汇准确性,独特性和动态分析,利用了一种最先进的深度学习模型改革者,以及先前工作的两个模型来评估Reassert和一种现有方法,称为地图集。我们对Reasert的评估显示了一个与地面真相完全匹配的单个项目生成的断言的44%,对于编译的生成断言,提高到51%。我们还通过使用改革者的使用,并通过28%的发出与地面真相相匹配的Atlas结果改善了结果。改革者还产生了最大比例的独特断言(71%),提供了进一步的证据,表明改革者产生了最有用的断言。

The automated generation of test code can reduce the time and effort required to build software while increasing its correctness and robustness. In this paper, we present RE-ASSERT, an approach for the automated generation of JUnit test asserts which produces more accurate asserts than previous work with fewer constraints. This is achieved by targeting projects individually, using precise code-to-test traceability for learning and by generating assert statements from the method-under-test directly without the need to write an assert-less test first. We also utilise Reformer, a state-of-the-art deep learning model, along with two models from previous work to evaluate ReAssert and an existing approach, known as ATLAS, using lexical accuracy,uniqueness, and dynamic analysis. Our evaluation of ReAssert shows up to 44% of generated asserts for a single project match exactly with the ground truth, increasing to 51% for generated asserts that compile. We also improve on the ATLAS results through our use of Reformer with 28% of generated asserts matching exactly with the ground truth. Reformer also produces the greatest proportion of unique asserts (71%), giving further evidence that Reformer produces the most useful asserts.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源