Guess What: Test Case Generation for Javascript with Unsupervised Probabilistic Type Inference

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

120 Downloads (Pure)


Search-based test case generation approaches make use of static type information to determine which data types should be used for the creation of new test cases. Dynamically typed languages like JavaScript, however, do not have this type information. In this paper, we propose an unsupervised probabilistic type inference approach to infer data types within the test case generation process. We evaluated the proposed approach on a benchmark of 98~units under test (i.e., exported classes and functions) compared to random type sampling w.r.t. branch coverage. Our results show that our type inference approach achieves a statistically significant increase in 56% of the test files with up to 71% of branch coverage compared to the baseline.
Original languageEnglish
Title of host publicationSearch-Based Software Engineering - 14th International Symposium, SSBSE 2022, Proceedings
Subtitle of host publication14th International Symposium, SSBSE 2022, Proceedings
EditorsMike Papadakis, Silvia Regina Vergilio
Place of PublicationCham
Number of pages16
ISBN (Electronic)978-3-031-21251-2
ISBN (Print)978-3-031-21250-5
Publication statusPublished - 2022
Event14th Symposium on Search-based Software Engineering - Singapore, Singapore, Singapore
Duration: 17 Nov 202218 Nov 2022
Conference number: 14

Publication series

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


Conference14th Symposium on Search-based Software Engineering
Abbreviated titleSSBSE
Internet address

Bibliographical note

Green Open Access added to TU Delft Institutional Repository 'You share, we take care!' - Taverne project
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.
  • SSBSE 2022 Best Paper Award

    Stallenberg, D.M. (Recipient), Olsthoorn, M.J.G. (Recipient) & Panichella, A. (Recipient), 17 Nov 2022

    Prize: Prize (including medals and awards)


Cite this