Toward Granular Automatic Unit Test Case Generation

04/12/2022
by   Fabiano Pecorelli, et al.
0

Unit testing verifies the presence of faults in individual software components. Previous research has been targeting the automatic generation of unit tests through the adoption of random or search-based algorithms. Despite their effectiveness, these approaches do not implement any strategy that allows them to create unit tests in a structured manner: indeed, they aim at creating tests by optimizing metrics like code coverage without ensuring that the resulting tests follow good design principles. In order to structure the automatic test case generation process, we propose a two-step systematic approach to the generation of unit tests: we first force search-based algorithms to create tests that cover individual methods of the production code, hence implementing the so-called intra-method tests; then, we relax the constraints to enable the creation of intra-class tests that target the interactions among production code methods.

READ FULL TEXT

page 1

page 2

page 3

page 4

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
02/09/2023

RICK: Generating Mocks from Production Data

Test doubles, such as mocks and stubs, are nifty fixtures in unit tests....
research
07/24/2021

Linear unit-tests for invariance discovery

There is an increasing interest in algorithms to learn invariant correla...
research
04/30/2023

Exploring the Effectiveness of Large Language Models in Generating Unit Tests

A code generation model generates code by taking a prompt from a code co...
research
01/13/2020

Towards Integration-Level Test Case Generation Using Call Site Information

Search-based approaches have been used in the literature to automate the...
research
03/27/2021

An empirical study into the relationship between class features and test smells

While a substantial body of prior research has investigated the form and...
research
07/11/2023

Tests4Py: A Benchmark for System Testing

Benchmarks are among the main drivers of progress in software engineerin...

Please sign up or login with your details

Forgot password? Click here to reset