Coverage Goal Selector for Combining Multiple Criteria in Search-Based Unit Test Generation

09/14/2023
by   Zhichao Zhou, et al.
0

Unit testing is critical to the software development process, ensuring the correctness of basic programming units in a program (e.g., a method). Search-based software testing (SBST) is an automated approach to generating test cases. SBST generates test cases with genetic algorithms by specifying the coverage criterion (e.g., branch coverage). However, a good test suite must have different properties, which cannot be captured using an individual coverage criterion. Therefore, the state-of-the-art approach combines multiple criteria to generate test cases. Since combining multiple coverage criteria brings multiple objectives for optimization, it hurts the test suites' coverage for certain criteria compared with using the single criterion. To cope with this problem, we propose a novel approach named smart selection. Based on the coverage correlations among criteria and the subsumption relationships among coverage goals, smart selection selects a subset of coverage goals to reduce the number of optimization objectives and avoid missing any properties of all criteria. We conduct experiments to evaluate smart selection on 400 Java classes with three state-of-the-art genetic algorithms under the 2-minute budget. On average, smart selection outperforms combining all goals on 65.1% of the classes having significant differences between the two approaches. Secondly, we conduct experiments to verify our assumptions about coverage criteria relationships. Furthermore, we experiment with different budgets of 5, 8, and 10 minutes, confirming the advantage of smart selection over combining all goals.

READ FULL TEXT

page 1

page 9

page 10

page 11

page 14

page 15

page 16

research
08/08/2022

Selectively Combining Multiple Coverage Goals in Search-Based Unit Test Generation

Unit testing is a critical part of software development process, ensurin...
research
09/11/2020

Unit Test Case Generation with Transformers

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

On-line tracing of XACML-based policy coverage criteria

Currently, eXtensible Access Control Markup Language (XACML) has becomin...
research
02/09/2021

Learning How to Search: Generating Effective Test Cases Through Adaptive Fitness Function Selection

Search-based test generation is guided by feedback from one or more fitn...
research
06/28/2022

FuSeBMC v4: Improving code coverage with smart seeds via fuzzing and static analysis

Bounded model checking (BMC) and fuzzing techniques are among the most e...
research
02/22/2018

Employment of Multiple Algorithms for Optimal Path-based Test Selection Strategy

Executing various sequences of system functions in a system under test r...
research
09/19/2023

Revisiting and Improving Retrieval-Augmented Deep Assertion Generation

Unit testing validates the correctness of the unit under test and has be...

Please sign up or login with your details

Forgot password? Click here to reset