An Empirical Study of Flaky Tests in JavaScript
Authors:
- 1 October 2022
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 24-34
Abstract
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.Keywords
All Related Versions
This publication has 28 references indexed in Scilit:
- Understanding flaky tests: the developer’s perspective2019
- iFixFlakies: a framework for automatically fixing order-dependent flaky tests2019
- Root causing flaky tests in a large-scale industrial setting2019
- An Empirical Study of Flaky Tests in Android Apps2018
- Practical Test Dependency Detection2018
- A comprehensive study on real world concurrency bugs in Node.js2017
- Measuring the cost of regression testing in practice: a study of Java projects using continuous integration2017
- An empirical study of bugs in test code2015
- An empirical analysis of flaky tests2014
- Automated testing of GUI applications: Models, tools, and controlling flakiness2013