Commonality-Driven Unit Test Generation

Conference Paper (2020)
Author(s)

B. Evers (Student TU Delft)

P. Derakhshanfar (TU Delft - Software Engineering)

Xavier Devroey (TU Delft - Software Engineering)

AE Zaidman (TU Delft - Software Engineering)

Research Group
Software Engineering
Copyright
© 2020 B. Evers, P. Derakhshanfar, Xavier Devroey, A.E. Zaidman
DOI related publication
https://doi.org/10.1007/978-3-030-59762-7_9
More Info
expand_more
Publication Year
2020
Language
English
Copyright
© 2020 B. Evers, P. Derakhshanfar, Xavier Devroey, A.E. Zaidman
Research Group
Software Engineering
Bibliographical Note
Green Open Access added to TU Delft Institutional Repository ‘You share, we take care!’ – Taverne project https://www.openaccess.nl/en/you-share-we-take-care Otherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public. @en
Pages (from-to)
121-136
ISBN (print)
978-3-030-59761-0
ISBN (electronic)
978-3-030-59762-7
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Various search-based test generation techniques have been proposed to automate the generation of unit tests fulfilling different criteria (e.g., line coverage, branch coverage, mutation score, etc.). Despite several advances made over the years, search-based unit test generation still suffers from a lack of guidance due to the limited amount of information available in the source code that, for instance, hampers the generation of complex objects. Previous studies introduced many strategies to address this issue, e.g., dynamic symbolic execution or seeding, but do not take the internal execution of the methods into account. In this paper, we introduce a novel secondary objective called commonality score, measuring how close the execution path of a test case is from reproducing a common or uncommon execution pattern observed during the operation of the software. To assess the commonality score, we implemented it in EvoSuite and evaluated its application on 150 classes from JabRef, an open-source software for managing bibliography references. Our results are mixed. Our approach leads to test cases that indeed follow common or uncommon execution patterns. However, if the commonality score can have a positive impact on the structural coverage and mutation score of the generated test suites, it can also be detrimental in some cases.

Files

Evers2020_Chapter_Commonality_... (pdf)
(pdf | 0.569 Mb)
- Embargo expired in 01-07-2022
License info not available