Commonality-Driven Unit Test Generation

Research output: Chapter in Book/Conference proceedings/Edited volumeConference contributionScientificpeer-review

18 Downloads (Pure)

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.
Original languageEnglish
Title of host publicationSearch-Based Software Engineering - 12th International Symposium, SSBSE 2020
EditorsAldeida Aleti, Annibale Panichella
Place of PublicationCham
PublisherSpringer
Pages121-136
Number of pages16
ISBN (Electronic)978-3-030-59762-7
ISBN (Print)978-3-030-59761-0
DOIs
Publication statusPublished - Oct 2020
Event12th Symposium on Search-Based Software Engineering - Online, Italy
Duration: 7 Oct 20208 Oct 2020
Conference number: 12
http://ssbse2020.di.uniba.it

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume12420 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference12th Symposium on Search-Based Software Engineering
Abbreviated titleSSBSE 2020
CountryItaly
Period7/10/208/10/20
Internet address

Keywords

  • Automated unit testing
  • Common paths coverage
  • Search-based software testing
  • Secondary objective

Fingerprint Dive into the research topics of 'Commonality-Driven Unit Test Generation'. Together they form a unique fingerprint.

Cite this