Generating Understandable Unit Tests through End-to-End Test Scenario Carving

A. Deljouyi*, A.E. Zaidman

*Corresponding author for this work

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

Abstract

Automatic unit test generators such as EvoSuite are able to automatically generate unit test suites with high coverage. This removes the burden of writing unit tests from developers, but the generated tests are often difficult to understand for them. In this paper, we introduce the MicroTestCarver approach that generates unit tests starting from manual or scripted end-toend (E2E) tests. Using carved information from these E2E tests, we generate unit tests that have meaningful test scenarios and contain actual test data. When we apply our MicroTestCarver approach, we observe that 85% of the generated tests are executable. Through a user study involving 20 participants, we get indications that tests generated with MicroTestCarver are relatively easy to understand.
Original languageEnglish
Title of host publicationProceedings of the 23rd IEEE International Working Conference on Source Code Analysis and Manipulation (SCAM)
EditorsLeon Moonen, Christian Newman, Alessandra Gorla
PublisherIEEE Computer Society - Conference Publishing Services
Pages107-118
Number of pages12
ISBN (Electronic)9798350305067
DOIs
Publication statusPublished - 2023
Event23rd IEEE International Working Conference on Source Code Analysis and Manipulation - Bogotá, Colombia
Duration: 2 Oct 20233 Oct 2023
Conference number: 23

Publication series

NameProceedings - 2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation, SCAM 2023

Conference

Conference23rd IEEE International Working Conference on Source Code Analysis and Manipulation
Abbreviated titleSCAM 2023
Country/TerritoryColombia
CityBogotá
Period2/10/233/10/23

Bibliographical note

Green Open Access added to TU Delft Institutional Repository ‘You share, we take care!’ – Taverne project https://www.openaccess.nl/en/you-share-we-take-care
Otherwise as indicated in the copyright section: the publisher is the copyright holder of this work and the author uses the Dutch legislation to make this work public.

Keywords

  • Test Generation
  • Unit Testing
  • Understandability
  • Readability
  • Carving and Replaying

Fingerprint

Dive into the research topics of 'Generating Understandable Unit Tests through End-to-End Test Scenario Carving'. Together they form a unique fingerprint.

Cite this