Black-Box Prediction of Flaky Test Fix Categories Using Language Models

06/21/2023
by   Sakina Fatima, et al.
0

Flaky tests are problematic because they non-deterministically pass or fail for the same software version under test, causing confusion and wasting developer time. While machine learning models have been used to predict flakiness and its root causes, there is less work on providing support to fix the problem. To address this gap, we propose a framework that automatically generates labeled datasets for 13 fix categories and train models to predict the fix category of a flaky test by analyzing the test code only. Though it is unrealistic at this stage to accurately predict the fix itself, the categories provide precise guidance about what part of the test code to look at. Our approach is based on language models, namely CodeBERT and UniXcoder, whose output is fine-tuned with a Feed Forward Neural Network (FNN) or a Siamese Network-based Few Shot Learning (FSL). Our experimental results show that UniXcoder outperforms CodeBERT, in correctly predicting most of the categories of fixes a developer should apply. Furthermore, FSL does not appear to have any significant effect. Given the high accuracy obtained for most fix categories, our proposed framework has the potential to help developers to fix flaky tests quickly and accurately.To aid future research, we make our automated labeling tool, dataset, prediction models, and experimental infrastructure publicly available.

READ FULL TEXT
research
08/31/2022

Predicting Flaky Tests Categories using Few-Shot Learning

Flaky tests are tests that yield different outcomes when run on the same...
research
12/23/2021

Flakify: A Black-Box, Language Model-based Predictor for Flaky Tests

Software testing assures that code changes do not adversely affect exist...
research
07/15/2019

Myers-Briggs Personality Classification and Personality-Specific Language Generation Using Pre-trained Language Models

The Myers-Briggs Type Indicator (MBTI) is a popular personality metric t...
research
02/13/2023

Machine Learning Model Attribution Challenge

We present the findings of the Machine Learning Model Attribution Challe...
research
06/12/2017

Few-Shot Image Recognition by Predicting Parameters from Activations

In this paper, we are interested in the few-shot learning problem. In pa...
research
04/03/2023

LTM: Scalable and Black-box Similarity-based Test Suite Minimization based on Language Models

Test suite minimization (TSM) is typically used to improve the efficienc...
research
02/02/2022

Toward a traceable, explainable, and fairJD/Resume recommendation system

In the last few decades, companies are interested to adopt an online aut...

Please sign up or login with your details

Forgot password? Click here to reset