Skip to main content
QUICK REVIEW

[Paper Review] Empirical Analysis of Factors and their Effect on Test Flakiness - Practitioners' Perceptions

Azeem Ahmad, Ola Leifler|arXiv (Cornell University)|Jun 3, 2019
Software Engineering ResearchComputer Science44 references9 citations
TL;DR

This study investigates practitioners' perceptions of test flakiness through a multiple case study across four Scandinavian industries, identifying 23 factors affecting flakiness—categorized as test quality, software quality, actual flaky tests, and company-specific factors. The key contribution is a practitioner-informed framework of flakiness factors with 86% agreement across participants, highlighting the need for preventive guidelines over reactive detection.

ABSTRACT

Developers always wish to ensure that their latest changes to the code base do not break existing functionality. If test cases fail, they expect these failures to be connected to the submitted changes. Unfortunately, a flaky test can be the reason for a test failure. Developers spend time to relate possible test failures to the submitted changes only to find out that the cause for these failures is test flakiness. The dilemma of an identification of the real failures or flaky test failures affects developers' perceptions about what is test flakiness. Prior research on test flakiness has been limited to test smells and tools to detect test flakiness. In this paper, we have conducted a multiple case study with four different industries in Scandinavia to understand practitioners' perceptions about test flakiness and how this varies between industries. We observed that there are little differences in how the practitioners perceive test flakiness. We identified 23 factors that are perceived to affect test flakiness. These perceived factors are categorized as 1) Software test quality, 2) Software Quality, 3) Actual Flaky test and 4) Company-specific factors. We have studied the nature of effects such as whether factors increase, decrease or affect the ability to detect test flakiness. We validated our findings with different participants of the 4 companies to avoid biases. The average agreement rate of the identified factors and their effects are 86% and 86% respectively, among participants.

Motivation & Objective

  • To understand practitioners' perceptions of test flakiness in real-world industrial settings.
  • To identify factors—beyond test smells—that practitioners believe increase, decrease, or affect the detection of test flakiness.
  • To validate findings across multiple companies to reduce bias and enhance generalizability.
  • To explore how perceptions of flakiness vary across industries and influence test quality practices.
  • To provide a foundation for developing preventive strategies in software testing based on practitioner experience.

Proposed method

  • Conducted a multiple case study across four Scandinavian companies from diverse industries.
  • Collected data via online surveys, in-person workshops, and site visits to capture practitioner perceptions.
  • Identified and categorized 23 factors affecting test flakiness into four domains: software test quality, software quality, actual flaky tests, and company-specific factors.
  • Validated findings through separate workshops with different participants to reduce bias and ensure consensus.
  • Mapped identified factors to existing literature to validate alignment with known testing principles.
  • Used qualitative and quantitative analysis to assess agreement rates (86% for factors, 86% for effects) across participants.

Experimental results

Research questions

  • RQ1How do practitioners in different industries perceive test flakiness?
  • RQ2What factors, beyond test smells, do practitioners believe affect test flakiness?
  • RQ3How do these factors influence the detection or occurrence of flaky tests?
  • RQ4To what extent do practitioners agree on the identified factors and their effects?
  • RQ5How do company-specific practices shape perceptions of test flakiness?

Key findings

  • 23 factors affecting test flakiness were identified, categorized into four domains: software test quality, software quality, actual flaky tests, and company-specific factors.
  • The average agreement rate among participants for identified factors was 86%, and for their effects, it was also 86%, indicating strong consensus.
  • Practitioners perceive flaky tests as a result of poor test case design, environmental variability, and organizational practices rather than just code smells.
  • Factors such as 'web component run-time generation' were perceived as highly flaky by one company but not by others, highlighting context-specific perceptions.
  • The study found that perceived flakiness is influenced by workplace experience, observed failures, and organizational culture, not just technical artifacts.
  • Practitioners emphasized that flaky tests are fundamentally about test case quality and that prevention through design guidelines is more effective than post-hoc detection.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.