跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 软件工程

arXiv:2308.08033 (cs)
[提交于 2023年8月15日 (v1),最后修订于 2024年7月30日 (此版本, v3)]

标题:Domain Adaptation for Code Model-based Unit Test Case Generation

作者:Jiho Shin, Sepehr Hashtroudi, Hadi Hemmati, Song Wang
查看论文《Domain Adaptation for Code Model-based Unit Test Case Generation》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Recently, deep learning-based test case generation approaches have been proposed to automate the generation of unit test cases. In this study, we leverage Transformer-based code models to generate unit tests with the help of Domain Adaptation (DA) at a project level. Specifically, we use CodeT5, a relatively small language model trained on source code data, and fine-tune it on the test generation task. Then, we apply domain adaptation to each target project data to learn project-specific knowledge (project-level DA). We use the Methods2test dataset to fine-tune CodeT5 for the test generation task and the Defects4j dataset for project-level domain adaptation and evaluation. We compare our approach with (a) CodeT5 fine-tuned on the test generation without DA, (b) the A3Test tool, and (c) GPT-4 on five projects from the Defects4j dataset. The results show that tests generated using DA can increase the line coverage by 18.62%, 19.88%, and 18.02% and mutation score by 16.45%, 16.01%, and 12.99% compared to the above (a), (b), and (c) baselines, respectively. The overall results show consistent improvements in metrics such as parse rate, compile rate, BLEU, and CodeBLEU. In addition, we show that our approach can be seen as a complementary solution alongside existing search-based test generation tools such as EvoSuite, to increase the overall coverage and mutation scores with an average of 34.42% and 6.8%, for line coverage and mutation score, respectively.
评论: 11 pages + reference. Accepted in ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA) 2024
主题: 软件工程 (cs.SE); 人工智能 (cs.AI)
引用方式: arXiv:2308.08033 [cs.SE]
  (或者 arXiv:2308.08033v3 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2308.08033

提交历史

来自:Jiho Shin
[v1] 2023年8月15日 星期二 20:48:50 UTC
[v2] 2024年1月19日 星期五 15:58:34 UTC
[v3] 2024年7月30日 星期二 19:24:47 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs
< 上一篇   |   下一篇 >
最新 | 近期 | 2024-07
切换浏览方式为:
cs.SE
cs.AI

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站