Testing with Fewer Resources: An Adaptive Approach to Performance-Aware Test Case Generation

07/19/2019
by   Giovanni Grano, et al.
1

Automated test case generation is an effective technique to yield high-coverage test suites. While the majority of research effort has been devoted to satisfying coverage criteria, a recent trend emerged towards optimizing other non-coverage aspects. In this regard, runtime and memory usage are two essential dimensions: less expensive tests reduce the resource demands for the generation process and for later regression testing phases. This study shows that performance-aware test case generation requires solving two main challenges: providing accurate measurements of resource usage with minimal overhead and avoiding detrimental effects on both final coverage and fault detection effectiveness. To tackle these challenges we conceived a set of performance proxies (inspired by previous work on performance testing) that provide an approximation of the test execution costs (i.e., runtime and memory usage). Thus, we propose an adaptive strategy, called pDynaMOSA, which leverages these proxies by extending DynaMOSA, a state-of-the-art evolutionary algorithm in unit testing. Our empirical study --involving 110 non-trivial Java classes--reveals that our adaptive approach has comparable results to DynaMOSA over seven different coverage criteria (including branch, line, and weak mutation coverage) and similar fault detection effectiveness (measured via strong mutation coverage). Additionally, we observe statistically significant improvements regarding runtime and memory usage for test suites with a similar level of target coverage. Our quantitative and qualitative analyses highlight that our adaptive approach facilitates selecting better test inputs, which is an essential factor to test production code with fewer resources.

READ FULL TEXT

page 1

page 3

page 4

page 9

page 15

research
02/20/2018

Fault Detection Effectiveness of Source Test Case Generation Strategies for Metamorphic Testing

Metamorphic testing is a well known approach to tackle the oracle proble...
research
07/01/2020

Regression Test Case Prioritization by Code Combinations Coverage

Regression test case prioritization (RTCP) aims to improve the rate of f...
research
12/30/2022

BlueCov: Integrating Test Coverage and Model Checking with JBMC

Automated test case generation tools help businesses to write tests and ...
research
08/11/2021

Hybrid Multi-level Crossover for Unit Test Case Generation

State-of-the-art search-based approaches for test case generation work a...
research
11/24/2022

Multi-Objective Search-Based Software Microbenchmark Prioritization

Ensuring that software performance does not degrade after a code change ...
research
04/23/2021

Comparing Mutation Coverage Against Branch Coverage in an Industrial Setting

The state-of-the-practice in software development is driven by constant ...
research
04/20/2018

Ticket Coverage: Putting Test Coverage into Context

There is no metric that determines how well the implementation of a tick...

Please sign up or login with your details

Forgot password? Click here to reset