Flakify: A Black-Box, Language Model-based Predictor for Flaky Tests
Not on the map. Why?
Abstract (arXiv)
Software testing assures that code changes do not adversely affect existing functionality. However, a test case can be flaky, i.e., passing and failing across executions, even for the same version of the source code. Flaky test cases introduce overhead to software development as they can lead to unnecessary attempts to debug production or testing code. The state-of-the-art ML-based flaky test case predictors rely on pre-defined sets of features that are either project-specific, require access to production code, which is not always available to software test engineers. Therefore, in this paper, we propose Flakify, a black-box, language model-based predictor for flaky test cases. Flakify relies exclusively on the source code of test cases, thus not requiring to (a) access to production code (black-box), (b) rerun test cases, (c) pre-define features. To this end, we employed CodeBERT, a pre-trained language model, and fine-tuned it to predict flaky test cases using the source code of test cases. We evaluated Flakify on two publicly available datasets (FlakeFlagger and IDoFT) for flaky test cases and compared our technique with the FlakeFlagger approach using two different evaluation procedures: cross-validation and per-project validation. Flakify achieved high F1-scores on both datasets using cross-validation and per-project validation, and surpassed FlakeFlagger by 10 and 18 percentage points in terms of precision and recall, respectively, when evaluated on the FlakeFlagger dataset, thus reducing the cost bound to be wasted on unnecessarily debugging test cases and production code by the same percentages. Flakify also achieved significantly higher prediction results when used to predict test cases on new projects, suggesting better generalizability over FlakeFlagger. Our results further show that a black-box version of FlakeFlagger is not a viable option for predicting flaky test cases.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). First posted on arXiv 23 Dec 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 3; 2024: 2; 2025: 3; 2026: 3.
11 papers.
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2024NaviQAte: Functionality-Guided Web Application Navigationcited by 9
- 2023Can GPT-4 Replicate Empirical Software Engineering Research?cited by 7
- 2023FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categories and Test Code Repaircited by 6
- 2025An Analysis of LLM Fine-Tuning and Few-Shot Learning for Flaky Test Detection and Classificationcited by 2
- 2024FlaKat: A Machine Learning-Based Categorization Framework for Flaky Testscited by 0
- 2025A Match Made in Heaven? AI-driven Matching of Vulnerabilities and Security Unit Testscited by 0
- 2025FlakyGuard: Automatically Fixing Flaky Tests at Industry Scalecited by 0
- 2026Explicating Tacit Regulatory Knowledge from LLMs to Auto-Formalize Requirements for Compliance Test Case Generationcited by 0
- 2026Predicting Intermittent Job Failure Categories for Diagnosis Using Few-Shot Fine-Tuned Language Modelscited by 0
- 2026Automating Detection and Root-Cause Analysis of Flaky Tests in Quantum Softwarecited by 0
- 2026Automating Detection and Root-Cause Analysis of Flaky Tests in Quantum Software9 Mar 2026
- 2026Predicting Intermittent Job Failure Categories for Diagnosis Using Few-Shot Fine-Tuned Language Models29 Jan 2026
- 2026Explicating Tacit Regulatory Knowledge from LLMs to Auto-Formalize Requirements for Compliance Test Case Generation14 Jan 2026
- 2025FlakyGuard: Automatically Fixing Flaky Tests at Industry Scale18 Nov 2025
- 2025A Match Made in Heaven? AI-driven Matching of Vulnerabilities and Security Unit Tests5 Feb 2025
- 2025An Analysis of LLM Fine-Tuning and Few-Shot Learning for Flaky Test Detection and Classification4 Feb 2025
- 2024NaviQAte: Functionality-Guided Web Application Navigation16 Sep 2024
- 2024FlaKat: A Machine Learning-Based Categorization Framework for Flaky Tests1 Mar 2024
- 2023Can GPT-4 Replicate Empirical Software Engineering Research?3 Oct 2023
- 2023Large Language Models for Software Engineering: A Systematic Literature Review21 Aug 2023
- 2023FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categories and Test Code Repair21 Jun 2023