A3Test: Assertion-Augmented Automated Test Case Generation

02/20/2023
by   Saranya Alagarsamy, et al.
0

Test case generation is an important activity, yet a time-consuming and laborious task. Recently, AthenaTest – a deep learning approach for generating unit test cases – is proposed. However, AthenaTest can generate less than one-fifth of the test cases correctly, due to a lack of assertion knowledge and test signature verification. In this paper, we propose A3Test, a DL-based test case generation approach that is augmented by assertion knowledge with a mechanism to verify naming consistency and test signatures. A3Test leverages the domain adaptation principles where the goal is to adapt the existing knowledge from an assertion generation task to the test case generation task. We also introduce a verification approach to verify naming consistency and test signatures. Through an evaluation of 5,278 focal methods from the Defects4j dataset, we find that our A3Test (1) achieves 147 15 AthenaTest; (2) still outperforms the existing pre-trained models for the test case generation task; (3) contributes substantially to performance improvement via our own proposed assertion pre-training and the verification components; (4) is 97.2

READ FULL TEXT

page 1

page 2

page 3

page 4

research
09/11/2020

Unit Test Case Generation with Transformers

Automated Unit Test Case generation has been the focus of extensive lite...
research
07/21/2022

CodeT: Code Generation with Generated Tests

The task of generating code solutions for a given programming problem ca...
research
08/15/2023

Automated Test Case Generation Using Code Models and Domain Adaptation

State-of-the-art automated test generation techniques, such as search-ba...
research
06/21/2022

Plug and Play Counterfactual Text Generation for Model Robustness

Generating counterfactual test-cases is an important backbone for testin...
research
04/08/2021

Extending Hierarchical Delta Debugging with Hoisting

Minimizing failing test cases is an important pre-processing step on the...
research
12/10/2021

Copy, Right? A Testing Framework for Copyright Protection of Deep Learning Models

Deep learning (DL) models, especially those large-scale and high-perform...
research
11/21/2020

Dynamic Data Consistency Tests Using a CRUD Matrix as an Underlying Model

In testing of software and Internet of Things (IoT) systems, one of nece...

Please sign up or login with your details

Forgot password? Click here to reset