Lune

FSE2023顶会

Code Coverage Criteria for Asynchronous Programs

Mohammad Ganji, Saba Alimadadi, Frank Tip

摘要

Asynchronous software often exhibits complex and error-prone behaviors that should be tested thoroughly. Code coverage has been the most popular metric to assess test suite quality. However, traditional code coverage criteria do not adequately reect completion, interactions, and error handling of asynchronous operations.

This paper proposes novel test adequacy criteria for measuring: (i) completion of asynchronous operations in terms of both successful and exceptional execution, (ii) registration of reactions for handling both possible outcomes, and (iii) execution of said reactions through tests. We implement JS, a tool for automatically measuring coverage according to these criteria in JavaScript applications, as an interactive plug-in for Visual Studio Code.

An evaluation of JS on 20 JavaScript applications shows that the proposed criteria can help improve assessment of test adequacy, complementing traditional criteria. According to our investigation of 15 real GitHub issues concerned with asynchrony, the new criteria can help reveal faulty asynchronous behaviors that are untested yet are deemed covered by traditional coverage criteria. We also report on a controlled experiment with 12 participants to investigate the usefulness of JS in realistic settings, demonstrating its eectiveness in improving programmers' ability to assess test adequacy and detect untested behavior of asynchronous code.

• Software and its engineering ! Software testing and debugging.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • DrAsync: Identifying and Visualizing Anti-Patterns in Asynchronous JavaScript 引用了 Automatic migration from synchronous to asynchronous JavaScript APIs
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. WhyFlow: Interrogative Debugger for Sensemaking Taint AnalysisBurak Yetistiren, Hong Jin Kang, Miryung KimICSE 2026

它引用的 Paper6

  1. A Sense of Time for JavaScript and Node.js: First-Class Timeouts as a Cure for Event Handler PoisoningJames C. Davis, Eric R. Williamson, Dongyoon LeeUSENIX Security 2018 · 54 次引用
  2. Automatic migration from synchronous to asynchronous JavaScript APIsSatyajit Gokhale, Alexi Turcotte, Frank TipOOPSLA 2021 · 23 次引用
  3. Nessie: Automatically Testing JavaScript APIs with Asynchronous CallbacksEllen Arteca, Sebastian Harner, Michael Pradel, Frank TipICSE 2022 · 12 次引用
  4. Race Detection for Event-Driven Node.js ApplicationsXiaoning Chang, Wensheng Dou, Jun Wei, Tao Huang 等ASE 2021 · 6 次引用
  5. DrAsync: Identifying and Visualizing Anti-Patterns in Asynchronous JavaScriptAlexi Turcotte, Michael D. Shah, Mark W. Aldrich, Frank TipICSE 2022 · 5 次引用

相关 Paper

  1. Feature-Sensitive Coverage for Conformance Testing of Programming Language ImplementationsJihyeok Park, Dongjun Youn, Kanguk Lee, Sukyoung RyuPLDI 2023 · 3 次引用
  2. Measuring and Mitigating Gaps in Structural TestingSoneya Binta Hossain, Matthew B. Dwyer, Sebastian G. Elbaum, Anh Nguyen-TuongICSE 2023 · 7 次引用
  3. SoK: State of the Krawlers - Evaluating the Effectiveness of Crawling Algorithms for Web Security MeasurementsAleksei Stafeev, Giancarlo PellegrinoUSENIX Security 2024 · 12 次引用
  4. Generalizing Test Cases for Comprehensive Test Scenario CoverageBinhang Qi, Yun Lin, Xinyi Weng, Chenyan Liu 等FSE 2026 · 1 次引用
  5. SoFi: Reflection-Augmented Fuzzing for JavaScript EnginesXiaoyu He, Xiaofei Xie, Yuekang Li, Jianwen Sun 等CCS 2021 · 34 次引用
黄昏的海面,两侧是细线勾勒的悬崖