Diversifying focused testing for unit testing

Article


Menendez Benito, 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
TypeArticle
TitleDiversifying focused testing for unit testing
AuthorsMenendez Benito, 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.

KeywordsSoftware
PublisherAssociation for Computing Machinery (ACM)
JournalACM Transactions on Software Engineering and Methodology
ISSN1049-331X
Electronic1557-7392
Publication dates
Online19 Apr 2021
Print31 Oct 2021
Publication process dates
Submitted01 Jul 2019
Accepted01 Jan 2021
Deposited15 Apr 2021
Output statusPublished
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
LanguageEnglish
Permalink -

https://repository.mdx.ac.uk/item/894z0

Download files


Accepted author manuscript
TOSEM21_FGT.pdf
File access level: Open

  • 114
    total views
  • 34
    total downloads
  • 0
    views this month
  • 0
    downloads this month

Export as

Related outputs

Hashing fuzzing: introducing input diversity to improve crash detection
Menendez Benito, H. and Clark, D. 2022. Hashing fuzzing: introducing input diversity to improve crash detection. IEEE Transactions on Software Engineering. 48 (9), pp. 3540-3553. https://doi.org/10.1109/TSE.2021.3100858
Output sampling for output diversity in automatic unit test generation
Menéndez, H., Boreale, M., Gorla, D. and Clark, D. 2022. Output sampling for output diversity in automatic unit test generation. IEEE Transactions on Software Engineering. 48 (1), pp. 295-308. https://doi.org/10.1109/TSE.2020.2987377
Clustering: finding patterns in the darkness
Menendez Benito, H. 2021. Clustering: finding patterns in the darkness. Open Journal of Machine Learning. 1 (1), pp. 1-28. https://doi.org/10.46723/ojml.v1i1.4
Malware: the never-ending arm race
Menendez Benito, H. 2021. Malware: the never-ending arm race. Open Journal of Cybersecurity. 1 (1), pp. 1-25. https://doi.org/10.46723/ojc.1.1.3
Software testing or the bugs’ nightmare
Menendez Benito, H. 2021. Software testing or the bugs’ nightmare. Open Journal of Software Engineering. 1 (1), pp. 1-21. https://doi.org/10.46723/ojse.1.1.1
Getting ahead of the arms race: hothousing the coevolution of VirusTotal with a Packer
Menendez Benito, H., Clark, D. and T. Barr, E. 2021. Getting ahead of the arms race: hothousing the coevolution of VirusTotal with a Packer. Entropy. 23 (4). https://doi.org/10.3390/e23040395
Assessing stakeholder network engagement
Okazaki, S., Plangger, K., Roulet, T. and Menendez Benito, H. 2021. Assessing stakeholder network engagement. European Journal of Marketing. 55 (5), pp. 1359-1384. https://doi.org/10.1108/EJM-12-2018-0842
Designing large quantum key distribution networks via medoid-based algorithms
Garcia-Cobo, I. and Menendez Benito, H. 2021. Designing large quantum key distribution networks via medoid-based algorithms. Future Generation Computer Systems. 115, pp. 814-824. https://doi.org/10.1016/j.future.2020.09.037