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.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper1
问问它们各自怎么用它它引用的顶会 Paper6
- 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 次
- Automatic migration from synchronous to asynchronous JavaScript APIsSatyajit Gokhale, Alexi Turcotte, Frank TipOOPSLA 2021 · 被引用 23 次
- Nessie: Automatically Testing JavaScript APIs with Asynchronous CallbacksEllen Arteca, Sebastian Harner, Michael Pradel, Frank TipICSE 2022 · 被引用 12 次
- Race Detection for Event-Driven Node.js ApplicationsXiaoning Chang, Wensheng Dou, Jun Wei, Tao Huang 等ASE 2021 · 被引用 6 次
- DrAsync: Identifying and Visualizing Anti-Patterns in Asynchronous JavaScriptAlexi Turcotte, Michael D. Shah, Mark W. Aldrich, Frank TipICSE 2022 · 被引用 5 次
相关 Paper
- Feature-Sensitive Coverage for Conformance Testing of Programming Language ImplementationsJihyeok Park, Dongjun Youn, Kanguk Lee, Sukyoung RyuPLDI 2023 · 被引用 3 次
- Correlations between deep neural network model coverage criteria and model qualityShenao Yan, Guanhong Tao, Xuwei Liu, Juan Zhai 等FSE 2020 · 被引用 75 次
- Measuring and Mitigating Gaps in Structural TestingSoneya Binta Hossain, Matthew B. Dwyer, Sebastian G. Elbaum, Anh Nguyen-TuongICSE 2023 · 被引用 7 次
- Generalizing Test Cases for Comprehensive Test Scenario CoverageBinhang Qi, Yun Lin, Xinyi Weng, Chenyan Liu 等FSE 2026 · 被引用 1 次
- SoK: State of the Krawlers - Evaluating the Effectiveness of Crawling Algorithms for Web Security MeasurementsAleksei Stafeev, Giancarlo PellegrinoUSENIX Security 2024 · 被引用 12 次
