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).


翻译:摘要:测试套件最小化(TSM)通常用于通过移除冗余测试用例来提高软件测试效率,从而减少测试时间和资源,同时保持测试套件的故障检测能力。尽管存在多种TSM方法,但大多数依赖于代码覆盖率(白盒)或基于模型的特征,而这些特征对测试工程师而言并不总是可用。近年来,研究者提出了仅依赖测试代码(黑盒)的TSM方法,例如ATM和FAST-R。尽管ATM在有效性与效率之间取得了比FAST-R更优的权衡,但其执行时间随测试套件规模快速增长,导致大型软件系统的可扩展性问题。为解决扩展性挑战,我们提出LTM,一种基于语言模型的可扩展黑盒相似性TSM方法。为支持相似性度量,我们研究了三种预训练语言模型:CodeBERT、GraphCodeBERT和UniXcoder,用于提取测试代码(Java测试方法)的嵌入表示,并基于此计算两种相似性度量:余弦相似度与欧氏距离。我们的目标是找到不仅计算效率更高,还能更有效指导遗传算法(GA)的相似性度量——该遗传算法用于最小化测试套件,从而缩短最小化时间。实验结果表明,LTM的最佳配置(使用UniXcoder与余弦相似度)在故障检测率上显著优于ATM的最佳两种配置(平均0.84对比0.81),更重要的是运行速度更快(平均26.73分钟对比72.75分钟),其中准备时间最多快两个数量级,最小化时间快一个数量级。

0
下载
关闭预览

相关内容

专知会员服务
52+阅读 · 2020年12月14日
【Haute-Alsace博士论文】深度学习时序分类,175页pdf
专知会员服务
103+阅读 · 2020年10月4日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
代码重构:面向单元测试
阿里技术
0+阅读 · 2022年7月29日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
基于PyTorch/TorchText的自然语言处理库
专知
28+阅读 · 2019年4月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
笔记 | Deep active learning for named entity recognition
黑龙江大学自然语言处理实验室
24+阅读 · 2018年5月27日
【推荐】深度学习目标检测全面综述
机器学习研究会
21+阅读 · 2017年9月13日
【推荐】深度学习目标检测概览
机器学习研究会
10+阅读 · 2017年9月1日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
VIP会员
最新内容
战力倍增器:自主武器系统与乌克兰及加沙冲突
人工智能赋能战场情报:提速决策进程
专知会员服务
1+阅读 · 7月17日
《拥抱新兴技术:面向未来军官的教育革新》
专知会员服务
4+阅读 · 7月17日
《无人地面战车(UGV)的崛起》报告
专知会员服务
7+阅读 · 7月16日
美陆军任务式指挥人工智能解决方案
专知会员服务
13+阅读 · 7月16日
相关资讯
代码重构:面向单元测试
阿里技术
0+阅读 · 2022年7月29日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
基于PyTorch/TorchText的自然语言处理库
专知
28+阅读 · 2019年4月22日
强化学习的Unsupervised Meta-Learning
CreateAMind
18+阅读 · 2019年1月7日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
笔记 | Deep active learning for named entity recognition
黑龙江大学自然语言处理实验室
24+阅读 · 2018年5月27日
【推荐】深度学习目标检测全面综述
机器学习研究会
21+阅读 · 2017年9月13日
【推荐】深度学习目标检测概览
机器学习研究会
10+阅读 · 2017年9月1日
相关基金
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员