已入深夜,您辛苦了!由于当前在线用户较少,发布求助请尽量完整的填写文献信息,科研通机器人24小时在线,伴您度过漫漫科研夜!祝你早点完成任务,早点休息,好梦!

Effective test generation using pre-trained Large Language Models and mutation testing

考试(生物学) 突变 计算机科学 自然语言处理 遗传学 生物 基因 古生物学
作者
Arghavan Moradi Dakhel,Amin Nikanjam,Vahid Majdinasab,Foutse Khomh,Michel C. Desmarais
出处
期刊:Information & Software Technology [Elsevier]
卷期号:171: 107468-107468 被引量:14
标识
DOI:10.1016/j.infsof.2024.107468
摘要

One of the critical phases in the software development life cycle is software testing. Testing helps with identifying potential bugs and reducing maintenance costs. The goal of automated test generation tools is to ease the development of tests by suggesting efficient bug-revealing tests. Recently, researchers have leveraged Large Language Models (LLMs) of code to generate unit tests. While the code coverage of generated tests was usually assessed, the literature has acknowledged that the coverage is weakly correlated with the efficiency of tests in bug detection. To improve over this limitation, in this paper, we introduce MuTAP (Mutation Test case generation using Augmented Prompt) for improving the effectiveness of test cases generated by LLMs in terms of revealing bugs by leveraging mutation testing. Our goal is achieved by augmenting prompts with surviving mutants, as those mutants highlight the limitations of test cases in detecting bugs. MuTAP is capable of generating effective test cases in the absence of natural language descriptions of the Program Under Test (PUTs). We employ different LLMs within MuTAP and evaluate their performance on different benchmarks. Our results show that our proposed method is able to detect up to 28% more faulty human-written code snippets. Among these, 17% remained undetected by both the current state-of-the-art fully-automated test generation tool (i.e., Pynguin) and zero-shot/few-shot learning approaches on LLMs. Furthermore, MuTAP achieves a Mutation Score (MS) of 93.57% on synthetic buggy code, outperforming all other approaches in our evaluation. Our findings suggest that although LLMs can serve as a useful tool to generate test cases, they require specific post-processing steps to enhance the effectiveness of the generated test cases which may suffer from syntactic or functional errors and may be ineffective in detecting certain types of bugs and testing corner cases in PUTs.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
xylor完成签到 ,获得积分10
1秒前
可爱的紫菜完成签到 ,获得积分10
1秒前
凶狠的寄风完成签到 ,获得积分10
1秒前
精明向秋发布了新的文献求助10
2秒前
HUO完成签到 ,获得积分10
2秒前
Sunday完成签到 ,获得积分10
2秒前
WangWaud完成签到,获得积分10
2秒前
asaki完成签到,获得积分10
2秒前
shweah2003完成签到,获得积分10
3秒前
niubing完成签到,获得积分10
3秒前
陈尹蓝完成签到 ,获得积分10
3秒前
成阳完成签到,获得积分10
3秒前
1111完成签到 ,获得积分10
3秒前
Tei完成签到,获得积分0
3秒前
super完成签到,获得积分10
3秒前
9999完成签到 ,获得积分10
3秒前
火山完成签到 ,获得积分10
3秒前
mumu完成签到 ,获得积分10
4秒前
ZadeAO完成签到,获得积分10
4秒前
脆脆鲨发布了新的文献求助10
4秒前
伊蕾娜完成签到 ,获得积分10
5秒前
hi_traffic完成签到,获得积分10
5秒前
颜林林完成签到,获得积分10
7秒前
7秒前
AnJaShua完成签到 ,获得积分10
7秒前
8秒前
青糯完成签到 ,获得积分10
8秒前
9秒前
idiom完成签到 ,获得积分10
9秒前
张元东完成签到 ,获得积分10
10秒前
额123没名完成签到 ,获得积分10
10秒前
11秒前
虚心海燕完成签到,获得积分10
11秒前
12秒前
xuli-888完成签到,获得积分10
12秒前
炸鸡完成签到 ,获得积分10
12秒前
Gahye完成签到 ,获得积分10
12秒前
坦率紫烟发布了新的文献求助10
13秒前
Ghiocel完成签到,获得积分10
13秒前
尉迟书兰完成签到 ,获得积分10
13秒前
高分求助中
Continuum Thermodynamics and Material Modelling 3000
Production Logging: Theoretical and Interpretive Elements 2700
Mechanistic Modeling of Gas-Liquid Two-Phase Flow in Pipes 2500
Structural Load Modelling and Combination for Performance and Safety Evaluation 1000
Conference Record, IAS Annual Meeting 1977 720
電気学会論文誌D(産業応用部門誌), 141 巻, 11 号 510
Typology of Conditional Constructions 500
热门求助领域 (近24小时)
化学 材料科学 生物 医学 工程类 有机化学 生物化学 物理 纳米技术 计算机科学 内科学 化学工程 复合材料 基因 遗传学 物理化学 催化作用 量子力学 光电子学 冶金
热门帖子
关注 科研通微信公众号,转发送积分 3566455
求助须知:如何正确求助?哪些是违规求助? 3139157
关于积分的说明 9430760
捐赠科研通 2840013
什么是DOI,文献DOI怎么找? 1560936
邀请新用户注册赠送积分活动 730090
科研通“疑难数据库(出版商)”最低求助积分说明 717778

今日热心研友

爱静静
40
科目三
30
外向的花瓣
20
NicoLi
20
领导范儿
1
注:热心度 = 本日应助数 + 本日被采纳获取积分÷10