Diversifying focused testing for unit testing
Article
Menéndez, H., Jahangirova, G., Sarro, F., Tonella, P. and Clark, D. 2021. Diversifying focused testing for unit testing. ACM Transactions on Software Engineering and Methodology. 30 (4), pp. 1-24. https://doi.org/10.1145/3447265
Type | Article |
---|---|
Title | Diversifying focused testing for unit testing |
Authors | Menéndez, H., Jahangirova, G., Sarro, F., Tonella, P. and Clark, D. |
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. |
Keywords | Software |
Publisher | Association for Computing Machinery (ACM) |
Journal | ACM Transactions on Software Engineering and Methodology |
ISSN | 1049-331X |
Electronic | 1557-7392 |
Publication dates | |
Online | 19 Apr 2021 |
10 Jul 2021 | |
Publication process dates | |
Deposited | 15 Apr 2021 |
Accepted | 01 Jan 2021 |
Output status | Published |
Accepted author manuscript | File Access Level Open |
Copyright Statement | 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 |
Digital Object Identifier (DOI) | https://doi.org/10.1145/3447265 |
Language | English |
https://repository.mdx.ac.uk/item/894z0
Download files
25
total views12
total downloads0
views this month0
downloads this month