ReAssert: Deep Learning for Assert Generation

11/19/2020
by   Robert White, et al.
3

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 single project match exactly with the ground truth, increasing to 51 generated asserts that compile. We also improve on the ATLAS results through our use of Reformer with 28 ground truth. Reformer also produces the greatest proportion of unique asserts (71

READ FULL TEXT
research
02/20/2023

Learning Deep Semantics for Test Completion

Writing tests is a time-consuming yet essential task during software dev...
research
11/13/2018

Shall I Compare Thee to a Machine-Written Sonnet? An Approach to Algorithmic Sonnet Generation

We provide code that produces beautiful poetry. Our sonnet-generation al...
research
08/30/2018

Automated Scene Flow Data Generation for Training and Verification

Scene flow describes the 3D position as well as the 3D motion of each pi...
research
12/11/2020

On the Generation of Disassembly Ground Truth and the Evaluation of Disassemblers

When a software transformation or software security task needs to analyz...
research
08/15/2022

A Pipeline for DNS-Based Software Fingerprinting

In this paper, we present the modular design and implementation of DONUT...
research
07/28/2023

Towards Automatic Generation of Amplified Regression Test Oracles

Regression testing is crucial in ensuring that pure code refactoring doe...
research
06/19/2023

Guiding Language Models of Code with Global Context using Monitors

Language models of code (LMs) work well when the surrounding code in the...

Please sign up or login with your details

Forgot password? Click here to reset