LTM: Scalable and Black-Box Similarity-Based Test Suite Minimization Based on Language Models

被引:1
作者
Pan, Rongqi [1 ]
Ghaleb, Taher A. [2 ,3 ]
Briand, Lionel C. [4 ,5 ]
机构
[1] Univ Ottawa, Sch EECS, Ottawa, ON K1N 6N5, Canada
[2] Trent Univ, Comp Sci Dept, Peterborough, ON K9L 0G2, Canada
[3] Univ Ottawa, Ottawa, ON K1N 6N5, Canada
[4] Univ Limerick, Lero SFI Ctr Software Res, Limerick V94T9PX, Ireland
[5] Univ Ottawa, Sch EECS, Ottawa, ON K1N 6N5, Canada
基金
爱尔兰科学基金会; 加拿大自然科学与工程研究理事会;
关键词
Minimization; Codes; Fault detection; Closed box; Scalability; Time measurement; Genetic algorithms; Source coding; Vectors; Unified modeling language; Test suite minimization; test suite reduction; pre-trained language models; genetic algorithm; black-box testing; SELECTION; PRIORITIZATION;
D O I
10.1109/TSE.2024.3469582
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Test suites tend to grow when software evolves, making it often infeasible to execute all test cases with the allocated testing budgets, especially for large software systems. Test suite minimization (TSM) is employed 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. Most existing TSM approaches rely on code coverage (white-box) or model-based features, which are not always available to test engineers. Recent TSM approaches that rely only on test code (black-box) have been proposed, such as ATM and FAST-R. The former yields higher fault detection rates (FDR) while the latter is faster. To address scalability while retaining a high FDR, we propose LTM (Language model-based Test suite Minimization), a novel, scalable, and black-box similarity-based TSM approach based on large language models (LLMs), which is the first application of LLMs in the context of TSM. To support similarity measurement using test method embeddings, we investigate five different pre-trained language models: CodeBERT, GraphCodeBERT, UniXcoder, StarEncoder, and CodeLlama, on which we compute 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 to search for optimal minimized test suites, thus reducing the overall search time. Experimental results show that the best configuration of LTM (UniXcoder/Cosine) outperforms ATM in three aspects: (a) achieving a slightly greater saving rate of testing time ($41.72\%$41.72% versus $41.02\%$41.02%, on average); (b) attaining a significantly higher fault detection rate ($0.84$0.84 versus $0.81$0.81, on average); and, most importantly, (c) minimizing test suites nearly five times faster on average, with higher gains for larger test suites and systems, thus achieving much higher scalability.
引用
收藏
页码:3053 / 3070
页数:18
相关论文
共 50 条
[41]   Arborescent Orthogonal Least Squares Regression for NARMAX-Based Black-Box Fitting [J].
Thunus, Stephane J. P. S. ;
Parker, Julian D. ;
Weinzierl, Stefan .
IEEE ACCESS, 2024, 12 :155578-155597
[42]   Ontology Based Test Case Generation for Black Box Testing [J].
Ul Haq, Sami ;
Qamar, Usman .
PROCEEDINGS OF 2019 8TH INTERNATIONAL CONFERENCE ON EDUCATIONAL AND INFORMATION TECHNOLOGY (ICEIT 2019), 2019, :236-241
[43]   A Differential-Evolution-Based Approach to Extract Univariate Decision Trees From Black-Box Models Using Tabular Data [J].
Rivera-Lopez, Rafael ;
Ceballos, Hector G. .
IEEE ACCESS, 2024, 12 :169850-169868
[44]   A Review of Population-Based Metaheuristics for Large-Scale Black-Box Global Optimization-Part I [J].
Omidvar, Mohammad Nabi ;
Li, Xiaodong ;
Yao, Xin .
IEEE TRANSACTIONS ON EVOLUTIONARY COMPUTATION, 2022, 26 (05) :802-822
[45]   Mitigating Surrogate Bias in Black-Box PedestrianAttacks via Mask-Based Gradient Backpropagation [J].
Su, Binyi ;
Li, Dongying ;
Zhang, Hua ;
Chen, Haiyong ;
Li, Yong ;
Zhou, Zhong .
IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT, 2025, 74
[46]   Measuring Hit Ratio Metric for SOA-Based Application Using Black-Box Testing [J].
Dutta, A. ;
Godboley, S. ;
Mohapatra, D. P. .
COMPUTATIONAL INTELLIGENCE IN DATA MINING, CIDM 2016, 2017, 556 :591-599
[48]   Improved approach to KDI-based fault detection for non-linear black-box systems [J].
Kumamaru, K ;
Inoue, K ;
Iwamura, T .
SICE 2004 ANNUAL CONFERENCE, VOLS 1-3, 2004, :927-932
[49]   Promoting or Hindering: Stealthy Black-Box Attacks Against DRL-Based Traffic Signal Control [J].
Ren, Yan ;
Zhang, Heng ;
Cao, Xianghui ;
Yang, Chaoqun ;
Zhang, Jian ;
Li, Hongran .
IEEE INTERNET OF THINGS JOURNAL, 2024, 11 (04) :5816-5825
[50]   Black-box model-based regression testing of fail-safe behavior in web applications [J].
Andrews, Anneliese ;
Alhaddad, Ahmed ;
Boukhris, Salah .
JOURNAL OF SYSTEMS AND SOFTWARE, 2019, 149 :318-339