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
TypeArticle
TitleDiversifying focused testing for unit testing
AuthorsMené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.

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

  • 25
    total views
  • 12
    total downloads
  • 0
    views this month
  • 0
    downloads this month

Export as