Lune

ICSE2022Top-tier venue

Nessie: Automatically Testing JavaScript APIs with Asynchronous Callbacks

Ellen Arteca, Sebastian Harner, Michael Pradel, Frank Tip

Abstract

Previous algorithms for feedback-directed unit test generation iteratively create sequences of API calls by executing partial tests and by adding new API calls at the end of the test. These algorithms are challenged by a popular class of APIs: higher-order functions that receive callback arguments, which often are invoked asynchronously. Existing test generators cannot effectively test such APIs because they only sequence API calls, but do not nest one call into the callback function of another. This paper presents Nessie, the first feedback-directed unit test generator that supports nesting of API calls and that tests asynchronous callbacks. Nesting API calls enables a test to use values produced by an API that are available only once a callback has been invoked, and is often necessary to ensure that methods are invoked in a specific order. The core contributions of our approach are a tree-based representation of unit tests with callbacks and a novel algorithm to iteratively generate such tests in a feedback-directed manner. We evaluate our approach on ten popular JavaScript libraries with both asynchronous and synchronous callbacks. The results show that, in a comparison with LambdaTester, a state of the art test generation technique that only considers sequencing of method calls, Nessie finds more behavioral differences and achieves slightly higher coverage. Notably, Nessie needs to generate significantly fewer tests to achieve and exceed the coverage achieved by the state of the art.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Testora: Using Natural Language Intent to Detect Behavioral Regressions cites TOGLL: Correct and Strong Test Oracle Generation with LLMS
  • Testora: Using Natural Language Intent to Detect Behavioral Regressions cites LExecutor: Learning-Guided Execution
  • LExecutor: Learning-Guided Execution cites Coverage-based Greybox Fuzzing as Markov Chain
  • Coverage-based Greybox Fuzzing as Markov Chain cites Driller: Augmenting Fuzzing Through Selective Symbolic Execution
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. LExecutor: Learning-Guided ExecutionBeatriz Souza, Michael PradelFSE 2023 · 16 citations
  2. TOGLL: Correct and Strong Test Oracle Generation with LLMSSoneya Binta Hossain, Matthew B. DwyerICSE 2025 · 12 citations
  3. Code Coverage Criteria for Asynchronous ProgramsMohammad Ganji, Saba Alimadadi, Frank TipFSE 2023 · 3 citations
  4. Semantic Constraint Inference for Web Form Test GenerationParsa Alian, Noor Nashid, Mobina Shahbandeh, Ali MesbahISSTA 2024 · 1 citation
  5. Testora: Using Natural Language Intent to Detect Behavioral RegressionsMichael PradelICSE 2026 · 1 citation

Builds on3

  1. Coverage-based Greybox Fuzzing as Markov ChainMarcel Böhme, Van-Thuan Pham, Abhik RoychoudhuryCCS 2016 · 1,026 citations
  2. Driller: Augmenting Fuzzing Through Selective Symbolic ExecutionNick Stephens, John Grosen, Christopher Salls, Andrew Dutcher et al.NDSS 2016 · 1,021 citations
  3. Detecting locations in JavaScript programs affected by breaking library changesAnders Møller, Benjamin Barslev Nielsen, Martin Toldam TorpOOPSLA 2020 · 32 citations

Related papers

  1. Crabtree: Rust API Test Synthesis Guided by Coverage and TypeYoshiki Takashima, Chanhee Cho, Ruben Martins, Limin Jia et al.OOPSLA 2024 · 3 citations
  2. Feature-Sensitive Coverage for Conformance Testing of Programming Language ImplementationsJihyeok Park, Dongjun Youn, Kanguk Lee, Sukyoung RyuPLDI 2023 · 3 citations
  3. Automatic migration from synchronous to asynchronous JavaScript APIsSatyajit Gokhale, Alexi Turcotte, Frank TipOOPSLA 2021 · 23 citations
  4. LLM Test Generation via Iterative Hybrid Program AnalysisSijia Gu, Noor Nashid, Ali MesbahICSE 2026 · 6 citations
  5. HITS: High-coverage LLM-based Unit Test Generation via Method SlicingZejun Wang, Kaibo Liu, Ge Li, Zhi JinASE 2024 · 29 citations
Dusk over the sea between two cliffs drawn in fine vertical lines