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

10/28/2022
by   Rongqi Pan, et al.
0

Executing large test suites is time and resource consuming, sometimes impossible, and such test suites typically contain many redundant test cases. Hence, test case minimization is used to remove redundant test cases that are unlikely to detect new faults. However, most test case (suite) minimization techniques rely on code coverage (white-box), model-based features, or requirements specifications, which are not always accessible by test engineers. Recently, a set of novel techniques was proposed, called FAST-R, relying solely on test case code for test case minimization, which appeared to be much more efficient than white-box techniques. However, it achieved a comparable low fault detection capability for Java projects, making its application challenging in practice. This paper proposes ATM (AST-based Test case Minimizer), a similarity-based, search-based test case minimization technique, taking a specific budget as input, that also relies exclusively on the source code of test cases but attempts to achieve higher fault detection through finer-grained similarity analysis and a dedicated search algorithm. ATM transforms test case code into Abstract Syntax Trees (AST) and relies on four tree-based similarity measures to apply evolutionary search, specifically genetic algorithms, to minimize test cases. We evaluated the effectiveness and efficiency of ATM on a large dataset of 16 Java projects with 661 faulty versions using three budgets ranging from 25 achieved significantly higher fault detection rates (0.82 on average), compared to FAST-R (0.61 on average) and random minimization (0.52 on average), when running only 50 hours, on average), given that minimization is only occasionally applied when many new test cases are created (major releases). Results achieved for other budgets were consistent.

READ FULL TEXT
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
09/13/2022

White-Box and Black-Box Fuzzing for GraphQL APIs

The Graph Query Language (GraphQL) is a powerful language for APIs manip...
research
06/17/2022

CATTO: Just-in-time Test Case Selection and Execution

Regression testing ensures a System Under Test (SUT) still works as expe...
research
06/22/2022

Test Case Prioritization Using Partial Attention

Test case prioritization (TCP) aims to reorder the regression test suite...
research
09/14/2021

Improving Test Case Generation for REST APIs Through Hierarchical Clustering

With the ever-increasing use of web APIs in modern-day applications, it ...
research
08/20/2022

An ensemble meta-estimator to predict source code testability

Unlike most other software quality attributes, testability cannot be eva...
research
10/04/2022

Putting Them under Microscope: A Fine-Grained Approach for Detecting Redundant Test Cases in Natural Language

Natural language (NL) documentation is the bridge between software manag...

Please sign up or login with your details

Forgot password? Click here to reset