arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2207.01047cs.SE
收藏

JavaScript模型中薄片检验的实证研究

An Empirical Study of Flaky Tests in JavaScript

Negar Hashemi, Amjed Tahir, Shawn Rasheed

摘要:

片状测试(具有非确定性结果的测试)可能会对测试效率和软件可靠性造成问题。测试套件中的零散测试也会显著延迟软件发布。已经有几项研究试图量化不同程序设计语言中测试片状性的影响(例如,Java和Python)和应用程序域(例如,移动和基于GUI)。本文对JavaScript中的JavaScript测试状态进行了实证研究。我们从两个方面研究了JavaScript项目中的重复测试:这些项目中重复测试的主要原因和常见的修复策略。通过分析来自GitHub的大型、得分最高的JavaScript项目的452次提交,我们发现并发相关问题(例如,等待、竞争条件或死锁)是测试不稳定的最主要原因。其他导致重复测试的主要原因是特定于操作系统的(例如,在特定OS或OS版本上工作的特征)和网络稳定性(例如,因特网可用性或不良套接字管理)。就如何处理恶意测试而言,大多数恶意测试(>80%)都是固定的,以消除恶意行为,开发人员有时会跳过,隔离或删除恶意测试。

英文摘要:

Flaky tests (tests with non-deterministic outcomes) can be problematic for testing efficiency and software reliability. Flaky tests in test suites can also significantly delay software releases. There have been several studies that attempt to quantify the impact of test flakiness in different programming languages (e.g., Java and Python) and application domains (e.g., mobile and GUI-based). In this paper, we conduct an empirical study of the state of flaky tests in JavaScript. We investigate two aspects of flaky tests in JavaScript projects: the main causes of flaky tests in these projects and common fixing strategies. By analysing 452 commits from large, top-scoring JavaScript projects from GitHub, we found that flakiness caused by concurrency-related issues (e.g., async wait, race conditions or deadlocks) is the most dominant reason for test flakiness. The other top causes of flaky tests are operating system-specific (e.g., features that work on specific OS or OS versions) and network stability (e.g., internet availability or bad socket management). In terms of how flaky tests are dealt with, the majority of those flaky tests (>80%) are fixed to eliminate flaky behaviour and developers sometimes skip, quarantine or remove flaky tests.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑