Shamshiri, S., Rojas, J., Gazzola, L. et al. (4 more authors) (2018) Random or evolutionary search for object-oriented test suite generation? Software Testing, Verification & Reliability, 28 (4). e1660. ISSN 0960-0833
Abstract
An important aim in software testing is constructing a test suite with high structural code coverage, that is, ensuring that most if not all of the code under test have been executed by the test cases comprising the test suite. Several search‐based techniques have proved successful at automatically generating tests that achieve high coverage. However, despite the well‐established arguments behind using evolutionary search algorithms (eg, genetic algorithms) in preference to random search, it remains an open question whether the benefits can actually be observed in practice when generating unit test suites for object‐oriented classes. In this paper, we report an empirical study on the effects of using evolutionary algorithms (including a genetic algorithm and chemical reaction optimization) to generate test suites, compared with generating test suites incrementally with random search. We apply the EVOSUITE unit test suite generator to 1000 classes randomly selected from the SF110 corpus of open‐source projects. Surprisingly, the results show that the difference is much smaller than one might expect: While evolutionary search covers more branches of the type where standard fitness functions provide guidance, we observed that, in practice, the vast majority of branches do not provide any guidance to the search. These results suggest that, although evolutionary algorithms are more effective at covering complex branches, a random search may suffice to achieve high coverage of most object‐oriented classes.
Metadata
Item Type: | Article |
---|---|
Authors/Creators: |
|
Copyright, Publisher and Additional Information: | This is the peer reviewed version of the following article: Shamshiri S, Rojas Siles J M, Gazzola L, et al. Random or evolutionary search for object‐oriented test suite generation? Softw Test Verif Reliab. 2018;e1660, which has been published in final form at https://doi.org/10.1002/stvr.1660. This article may be used for non-commercial purposes in accordance with Wiley Terms and Conditions for Self-Archiving. |
Keywords: | Genetic algorithms; Random search; Chemical reaction optimization; Search based software testing; Automated software testing; Automated test generation |
Dates: |
|
Institution: | The University of Sheffield |
Academic Units: | The University of Sheffield > Faculty of Engineering (Sheffield) > Department of Computer Science (Sheffield) |
Funding Information: | Funder Grant number ENGINEERING AND PHYSICAL SCIENCE RESEARCH COUNCIL (EPSRC) EP/N023978/1 |
Depositing User: | Symplectic Sheffield |
Date Deposited: | 15 Feb 2018 15:50 |
Last Modified: | 07 Sep 2020 13:54 |
Status: | Published |
Publisher: | Wiley |
Refereed: | Yes |
Identification Number: | 10.1002/stvr.1660 |
Open Archives Initiative ID (OAI ID): | oai:eprints.whiterose.ac.uk:127562 |