A Large-Scale Empirical Investigation Into Cross-Project Flaky Test Prediction
Open Access
- 11 September 2024
- journal article
- research article
- Published by Institute of Electrical and Electronics Engineers (IEEE) in IEEE Access
- Vol. 12, 131255-131265
Abstract
Test flakiness arises when a test case exhibits inconsistent behavior by alternating between passing and failing states when executed against the same code. Previous research showed the significance of the problem in practice, proposing empirical studies into the nature of flakiness and automated techniques for its detection. Machine learning models emerged as a promising approach for flaky test prediction. However, existing research has predominantly focused on within-project scenarios, where models are trained and tested using data from a single project. On the contrary, little is known about how flaky test prediction models may be adapted to software projects lacking sufficient historical data for effective prediction. In this paper, we address this gap by proposing a large-scale assessment of flaky test prediction in cross-project scenarios, i.e., in situations where predictive models are trained using data coming from external projects. Leveraging a dataset of 1,385 flaky tests from 29 open-source projects, we examine static test flakiness prediction models and evaluate feature- and instance-based filtering methods for cross-project predictions. Our study underscores the difficulties in utilizing cross-project flaky test data and underscores the significance of filtering methods in enhancing prediction accuracy. Notably, we find that the TrAdaBoost filtering method significantly reduces data heterogeneity, leading to an F-Measure of 70%.Keywords
Funding Information
- Fonds voor Wetenschappelijk Onderzoek – Vlaanderen (FWO) Strategic Basic Research (SBO) BaseCamp Zero (S000323N)
This publication has 48 references indexed in Scilit:
- A novel instance‐based method for cross‐project just‐in‐time defect predictionSoftware: Practice and Experience, 2024
- An effective feature selection based cross-project defect prediction model for software quality improvementInternational Journal of System Assurance Engineering and Management, 2023
- Static test flakiness prediction: How Far Can We Go?Empirical Software Engineering, 2022
- What We Talk About When We Talk About Software Test Flakiness2021
- The Relation of Test-Related Factors to Software Quality: A Case Study on Apache SystemsEmpirical Software Engineering, 2021
- Practical Bayesian model evaluation using leave-one-out cross-validation and WAICStatistics and Computing, 2016
- Scikit-Learn2016
- On the relative value of cross-company and within-company data for defect predictionEmpirical Software Engineering, 2009
- A Caution Regarding Rules of Thumb for Variance Inflation FactorsQuality & Quantity, 2007
- Induction of decision treesMachine Learning, 1986