Abstract

The availability of effective test suites is critical for the development and maintenance of reliable software systems. To increase test effectiveness, software developers tend to employ larger and larger test suites. The recent availability of software tools for automatic test generation makes building large test suites affordable, therefore contributing to accelerating this trend. However, large test suites, though more effective, are resources and time consuming and therefore cannot be executed frequently. Reducing them without decreasing code coverage is a needed compromise between efficiency and effectiveness of the test, hence enabling a more regular check of the software under development. We propose a novel approach, namely REDUNET, to reduce a test suite while keeping the same code coverage. We integrate this approach in a complete framework for the automatic generation of efficient and effective test suites, which includes test suite generation, code coverage analysis, and test suite reduction. Our approach formulates the test suite reduction as a set cover problem and applies integer linear programming and a network-based optimisation, which takes advantage of the properties of the control flow graph. We find the optimal set of test cases that keeps the same code coverage in fractions of seconds on real software projects and test suites generated automatically by Randoop. The results on ten real software systems show that the proposed approach finds the optimal minimisation and achieves up to 90% reduction and more than 50% reduction on all systems under analysis. On the largest project our reduction algorithm performs more than three times faster than both integer linear programming alone and the state-of-the-art heuristic Harrold Gupta Soffa.

Highlights

  • Test cases ensure that a software system is checked against possible defects and let developers assess its correctness

  • We find the optimal set of test cases that keeps the same code coverage in fractions of seconds on real software projects and test suites generated automatically by Randoop

  • While we rely on existing approaches for test generation (Pacheco and Ernst 2007), we focus our effort on test suite reduction, i.e. finding a subset of test cases that cover the same amount of code of the original test suite while minimising its execution time

Read more

Summary

Introduction

Test cases ensure that a software system is checked against possible defects and let developers assess its correctness. In our previous contribution (Mongiovì et al 2019), we have employed Integer Linear Programming (ILP) and a Control Flow Graph (CFG) analysis to reduce the number of test cases while ensuring that code coverage (statement coverage) is kept unchanged, without considering test execution time.

Results
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call