Abstract

SummarySearch‐based techniques have been applied successfully to the task of generating unit tests for object‐oriented software. However, as for any meta‐heuristic search, the efficiency heavily depends on many factors; seeding, which refers to the use of previous related knowledge to help solve the testing problem at hand, is one such factor that may strongly influence this efficiency. This paper investigates different seeding strategies for unit test generation, in particular seeding of numerical and string constants derived statically and dynamically, seeding of type information and seeding of previously generated tests. To understand the effects of these seeding strategies, the results of a large empirical analysis carried out on a large collection of open‐source projects from the SF110 corpus and the Apache Commons repository are reported. These experiments show with strong statistical confidence that, even for a testing tool already able to achieve high coverage, the use of appropriate seeding strategies can further improve performance. © 2016 The Authors. Software Testing, Verification and Reliability Published by John Wiley & Sons Ltd.

Highlights

  • Search-based techniques have been shown to be a promising approach to tackle many kinds of software engineering tasks [1], software testing [2]

  • A test suite for a class is a set of test cases, where each test case in turn is a sequence of statements

  • Crossover and mutation operators have to be defined for each type of chromosome; in the case of test suite chromosomes, crossover amounts to exchange of test cases between two parent test suites, while mutation can arbitrarily update the set of test cases by adding new ones or discarding or modifying existing ones

Read more

Summary

Introduction

Search-based techniques have been shown to be a promising approach to tackle many kinds of software engineering tasks [1], software testing [2]. [3]), such testing techniques are still not widely adopted by practitioners This is partially due to current limitations in these techniques (e.g. in terms of efficiency and applicability) and because many of the different parameters that influence search-based software testing (SBST) are not well understood. Investigating these techniques is of practical value. If there is existing knowledge about the class under test in terms of sample values, these can be used instead of randomly generated values This may lead to an improvement of the overall performance of the test generation, which is typically measured in terms of the achieved code coverage. Modifying an existing test case involves deletion, change and insertion of statements (e.g. method calls)

Methods
Results
Conclusion
Full Text
Paper version not known

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

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.