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

04/03/2023
by   Rongqi Pan, et al.
0

Test suite minimization (TSM) is typically used to improve the efficiency of software testing by removing redundant test cases, thus reducing testing time and resources, while maintaining the fault detection capability of the test suite. Though many TSM approaches exist, most of them rely on code coverage (white-box) or model-based features, which are not always available for test engineers. Recent TSM approaches that rely only on test code (black-box) have been proposed, such as ATM and FAST-R. Though ATM achieves a better trade-off between effectiveness and efficiency than FAST-R, it suffers from scalability issues for large software systems as its execution time increases rapidly with test suite size. To address scalability, we propose LTM, a scalable and black-box similarity-based TSM approach based on language models. To support similarity measurement, we investigated three different pre-trained language models: CodeBERT, GraphCodeBERT, and UniXcoder, to extract embeddings of test code (Java test methods), on which we computed two similarity measures: Cosine Similarity and Euclidean Distance. Our goal is to find similarity measures that are not only computationally more efficient but can also better guide a Genetic Algorithm (GA), which is used for minimizing test suites, thus reducing minimization time. Experimental results showed that the best configuration of LTM (using UniXcoder with Cosine similarity) outperformed the best two configurations of ATM by achieving significantly higher fault detection rates (0.84 versus 0.81, on average) and, more importantly, running much faster (26.73 minutes versus 72.75 minutes, on average) than ATM, in terms of both preparation time (up to two orders of magnitude faster) and minimization time (one order of magnitude faster).

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/28/2022

ATM: Black-box Test Case Minimization based on Test Code Similarity and Evolutionary Search

Executing large test suites is time and resource consuming, sometimes im...
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
05/16/2019

TERMINATOR: Better Automated UI Test Case Prioritization

Automated UI testing is an important component of the continuous integra...
research
05/10/2022

White-box Testing of NLP models with Mask Neuron Coverage

Recent literature has seen growing interest in using black-box strategie...
research
06/27/2021

Effective grey-box testing with partial FSM models

For partial, nondeterministic, finite state machines, a new conformance ...
research
04/04/2023

Black Box Few-Shot Adaptation for Vision-Language models

Vision-Language (V-L) models trained with contrastive learning to align ...
research
06/21/2023

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

Flaky tests are problematic because they non-deterministically pass or f...

Please sign up or login with your details

Forgot password? Click here to reset