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

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

计算机科学 > 软件工程

arXiv:2002.05800 (cs)
[提交于 2020年2月13日 (v1),最后修订于 2020年2月19日 (此版本, v2)]

标题:On Learning Meaningful Assert Statements for Unit Test Cases

作者:Cody Watson, Michele Tufano, Kevin Moran, Gabriele Bavota, Denys Poshyvanyk
查看论文《On Learning Meaningful Assert Statements for Unit Test Cases》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Software testing is an essential part of the software lifecycle and requires a substantial amount of time and effort. It has been estimated that software developers spend close to 50% of their time on testing the code they write. For these reasons, a long standing goal within the research community is to (partially) automate software testing. While several techniques and tools have been proposed to automatically generate test methods, recent work has criticized the quality and usefulness of the assert statements they generate. Therefore, we employ a Neural Machine Translation (NMT) based approach called Atlas(AuTomatic Learning of Assert Statements) to automatically generate meaningful assert statements for test methods. Given a test method and a focal method (i.e.,the main method under test), Atlas can predict a meaningful assert statement to assess the correctness of the focal method. We applied Atlas to thousands of test methods from GitHub projects and it was able to predict the exact assert statement manually written by developers in 31% of the cases when only considering the top-1 predicted assert. When considering the top-5 predicted assert statements, Atlas is able to predict exact matches in 50% of the cases. These promising results hint to the potential usefulness ofour approach as (i) a complement to automatic test case generation techniques, and (ii) a code completion support for developers, whocan benefit from the recommended assert statements while writing test code.
主题: 软件工程 (cs.SE)
引用方式: arXiv:2002.05800 [cs.SE]
  (或者 arXiv:2002.05800v2 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2002.05800
相关 DOI: https://doi.org/10.1145/3377811.3380429

提交历史

来自:Cody Watson
[v1] 2020年2月13日 星期四 22:32:13 UTC
[v2] 2020年2月19日 星期三 03:09:22 UTC
全文链接:

访问论文:

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

当前浏览上下文:

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

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

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