Diversifying focused testing for unit testing
Menéndez, Héctor D. ORCID: https://orcid.org/0000-0002-6314-3725, Jahangirova, Gunel, Sarro, Federica, Tonella, Paolo and Clark, David
(2021)
Diversifying focused testing for unit testing.
ACM Transactions on Software Engineering and Methodology, 30
(4)
, 44.
pp. 1-24.
ISSN 1049-331X
[Article]
(doi:10.1145/3447265)
|
PDF
- Final accepted version (with author's formatting)
Download (897kB) | Preview |
Abstract
Software changes constantly because developers add new features or modifications. This directly affects the effectiveness of the testsuite associated with that software, especially when these new modifications are in a specific area that no test case covers. This paper tackles the problem of generating a high quality test suite to cover repeatedly a given point in a program, with the ultimate goal of exposing faults possibly affecting the given program point. Both search based software testing and constraint solving offer ready, but low quality, solutions to this: ideally a maximally diverse covering test set is required whereas search and constraint solving tend to generate test sets with biased distributions. Our approach, Diversified Focused Testing (DFT), uses a search strategy inspired by GödelTest. We artificially inject parameters into the code branching conditions and use a bi-objective search algorithm to find diverse inputs by perturbing the injected parameters, while keeping the path conditions still satisfiable. Our results demonstrate that our technique, DFT, is able to cover a desired point in the code at least 90% of the time. Moreover, adding diversity improves the bug detection and the mutation killing abilities of the test suites. We show that DFT achieves better results than focused testing, symbolic execution and random testing by achieving from 3% to 70% improvement in mutation score and up to 100% improvement in fault detection across 105 software subjects.
Item Type: | Article |
---|---|
Keywords (uncontrolled): | Software |
Research Areas: | A. > School of Science and Technology > Computer Science |
Item ID: | 32814 |
Notes on copyright: | Copyright © 2021 ACM. This is the author's version of the work. It is posted here for your personal use. Not for redistribution. The definitive Version of Record was published in ACM Transactions on Software Engineering and Methodology, http://dx.doi.org/10.1145/10.1145/3447265 |
Useful Links: | |
Depositing User: | Hector Menendez Benito |
Date Deposited: | 15 Apr 2021 10:35 |
Last Modified: | 15 Dec 2022 18:24 |
URI: | https://eprints.mdx.ac.uk/id/eprint/32814 |
Actions (login required)
![]() |
View Item |
Statistics
Additional statistics are available via IRStats2.