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

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

计算机科学 > 软件工程

arXiv:2303.00169 (cs)
[提交于 2023年3月2日]

标题:An Exploratory Study on the Usage and Readability of Messages Within Assertion Methods of Test Cases

作者:Taryn Takebayashi, Anthony Peruma, Mohamed Wiem Mkaouer, Christian D. Newman
查看论文《An Exploratory Study on the Usage and Readability of Messages Within Assertion Methods of Test Cases》的 PDF
查看中文 PDF 查看原文 PDF EasyResearch 阅读
摘要:Unit testing is a vital part of the software development process and involves developers writing code to verify or assert production code. Furthermore, to help comprehend the test case and troubleshoot issues, developers have the option to provide a message that explains the reason for the assertion failure. In this exploratory empirical study, we examine the characteristics of assertion messages contained in the test methods in 20 open-source Java systems. Our findings show that while developers rarely utilize the option of supplying a message, those who do, either compose it of only string literals, identifiers, or a combination of both types. Using standard English readability measuring techniques, we observe that a beginner's knowledge of English is required to understand messages containing only identifiers, while a 4th-grade education level is required to understand messages composed of string literals. We also discuss shortcomings with using such readability measuring techniques and common anti-patterns in assert message construction. We envision our results incorporated into code quality tools that appraise the understandability of assertion messages.
评论: This study has been accepted at: The 2nd International Workshop on Natural Language-based Software Engineering (NLBSE 2023)
主题: 软件工程 (cs.SE)
引用方式: arXiv:2303.00169 [cs.SE]
  (或者 arXiv:2303.00169v1 [cs.SE] 对于此版本)
  https://doi.org/10.48550/arXiv.2303.00169

提交历史

来自:Anthony Peruma
[v1] 2023年3月2日 星期四 00:00:00 UTC
全文链接:

访问论文:

  • 查看中文 PDF
  • 查看原文 PDF
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

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

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

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