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

被引:0
作者
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 (<bold>L</bold>anguage model-based<bold> </bold>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 条
  • [21] Structural Similarity-Based Nonlocal Variational Models for Image Restoration
    Wang, Wei
    Li, Fang
    Ng, Michael K.
    IEEE TRANSACTIONS ON IMAGE PROCESSING, 2019, 28 (09) : 4260 - 4272
  • [22] State-based models in regression test suite prioritization
    Tahat, Luay
    Korel, Bogdan
    Koutsogiannakis, George
    Almasri, Nada
    SOFTWARE QUALITY JOURNAL, 2017, 25 (03) : 703 - 742
  • [23] Content-based Document Routing and Index Partitioning for Scalable Similarity-based Searches in a Large Corpus
    Bhagwat, Deepavali
    Eshghi, Kave
    Mehra, Pankaj
    KDD-2007 PROCEEDINGS OF THE THIRTEENTH ACM SIGKDD INTERNATIONAL CONFERENCE ON KNOWLEDGE DISCOVERY AND DATA MINING, 2007, : 105 - 112
  • [24] Perception-Driven Imperceptible Adversarial Attack Against Decision-Based Black-Box Models
    Zhang, Shenyi
    Zheng, Baolin
    Jiang, Peipei
    Zhao, Lingchen
    Shen, Chao
    Wang, Qian
    IEEE TRANSACTIONS ON INFORMATION FORENSICS AND SECURITY, 2024, 19 : 3164 - 3177
  • [25] Black-Box Universal Adversarial Attack for DNN-Based Models of SAR Automatic Target Recognition
    Wan, Xuanshen
    Liu, Wei
    Niu, Chaoyang
    Lu, Wanjie
    Du, Meng
    Li, Yuanli
    IEEE JOURNAL OF SELECTED TOPICS IN APPLIED EARTH OBSERVATIONS AND REMOTE SENSING, 2024, 17 : 8673 - 8696
  • [26] Toward an Encoding Approach to Interaction-based Test Suite Minimization
    Nishino, Kohei
    Kitamura, Takashi
    Kishi, Tomoji
    Artho, Cyrille
    2020 IEEE 13TH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION WORKSHOPS (ICSTW), 2020, : 211 - 212
  • [27] ATSM: A coverage-based framework and a tool for test suite minimization
    Alekseev, Yaroslav
    Onischuck, Mikhail
    Zorin, Arseniy
    Chernyi, Vitaliy
    Iliyn, Evgeniy
    Itsykson, Vladimir
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2023, 36 (06)
  • [28] A Constraint-Based Framework for Test Case Generation in Method-Level Black-Box Unit Testing
    Chang, Chi-Kuang
    Lin, Nai-Wei
    JOURNAL OF INFORMATION SCIENCE AND ENGINEERING, 2016, 32 (02) : 365 - 387
  • [29] Test Suite Minimization with Mutation Testing-Based Many-Objective Evolutionary Optimization
    Zheng Wei
    Wu Xiaoxue
    Yang Xibing
    Cao Shichao
    Liu Wenxin
    Lin Jun
    2017 ANNUAL CONFERENCE ON SOFTWARE ANALYSIS, TESTING AND EVOLUTION (SATE 2017), 2017, : 30 - 36
  • [30] Search Based Test Suite Minimization for Fault Detection and Localization: A Co-driven Method
    Geng, Jingyao
    Li, Zheng
    Zhao, Ruilian
    Guo, Junxia
    SEARCH BASED SOFTWARE ENGINEERING, SSBSE 2016, 2016, 9962 : 34 - 48