自动生成单元测试的方法名称预测

Maxim Petukhov, Evelina Gudauskayte, A. Kaliyev, Mikhail Oskin, Dmitry Ivanov, Qianxiang Wang
{"title":"自动生成单元测试的方法名称预测","authors":"Maxim Petukhov, Evelina Gudauskayte, A. Kaliyev, Mikhail Oskin, Dmitry Ivanov, Qianxiang Wang","doi":"10.1109/ICCQ53703.2022.9763112","DOIUrl":null,"url":null,"abstract":"Writing intuitively understandable method names is an important aspect of good programming practice. The method names have to summarize the codes' behavior such that software engineers would easily understand their purpose. Modern automatic testing tools are able to generate potentially unlimited number of unit tests for a project under test. However, these tests suffers from unintelligible unit test names as it is quite difficult to understand what each test triggers and checks. This inspired us to adapt the state-of-the-art method name prediction approaches for automatically generated unit tests. We have developed a graph extraction pipeline with prediction models based on Graph Neural Networks (GNNs). Extracted graphs contain information about the structure of unit tests and their called functions. The experiment results have shown that the proposed work outperforms other models with precision = 0.48, recall = 0.42 and F1 = 0.45 results. The dataset and source codes are released for wide public access.","PeriodicalId":174100,"journal":{"name":"2022 International Conference on Code Quality (ICCQ)","volume":"14 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-04-23","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Method Name Prediction for Automatically Generated Unit Tests\",\"authors\":\"Maxim Petukhov, Evelina Gudauskayte, A. Kaliyev, Mikhail Oskin, Dmitry Ivanov, Qianxiang Wang\",\"doi\":\"10.1109/ICCQ53703.2022.9763112\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Writing intuitively understandable method names is an important aspect of good programming practice. The method names have to summarize the codes' behavior such that software engineers would easily understand their purpose. Modern automatic testing tools are able to generate potentially unlimited number of unit tests for a project under test. However, these tests suffers from unintelligible unit test names as it is quite difficult to understand what each test triggers and checks. This inspired us to adapt the state-of-the-art method name prediction approaches for automatically generated unit tests. We have developed a graph extraction pipeline with prediction models based on Graph Neural Networks (GNNs). Extracted graphs contain information about the structure of unit tests and their called functions. The experiment results have shown that the proposed work outperforms other models with precision = 0.48, recall = 0.42 and F1 = 0.45 results. The dataset and source codes are released for wide public access.\",\"PeriodicalId\":174100,\"journal\":{\"name\":\"2022 International Conference on Code Quality (ICCQ)\",\"volume\":\"14 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-04-23\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 International Conference on Code Quality (ICCQ)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICCQ53703.2022.9763112\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 International Conference on Code Quality (ICCQ)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICCQ53703.2022.9763112","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

编写直观易懂的方法名是良好编程实践的一个重要方面。方法名必须总结代码的行为,这样软件工程师就能很容易地理解它们的目的。现代自动测试工具能够为被测项目生成潜在的无限数量的单元测试。然而,这些测试有难以理解的单元测试名称,因为很难理解每个测试触发和检查的内容。这启发我们采用最先进的方法名称预测方法来自动生成单元测试。我们开发了一个基于图神经网络(GNNs)的预测模型的图提取管道。提取的图包含有关单元测试结构及其调用函数的信息。实验结果表明,该方法的准确率为0.48,召回率为0.42,F1 = 0.45,优于其他模型。数据集和源代码被广泛发布,供公众访问。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Method Name Prediction for Automatically Generated Unit Tests
Writing intuitively understandable method names is an important aspect of good programming practice. The method names have to summarize the codes' behavior such that software engineers would easily understand their purpose. Modern automatic testing tools are able to generate potentially unlimited number of unit tests for a project under test. However, these tests suffers from unintelligible unit test names as it is quite difficult to understand what each test triggers and checks. This inspired us to adapt the state-of-the-art method name prediction approaches for automatically generated unit tests. We have developed a graph extraction pipeline with prediction models based on Graph Neural Networks (GNNs). Extracted graphs contain information about the structure of unit tests and their called functions. The experiment results have shown that the proposed work outperforms other models with precision = 0.48, recall = 0.42 and F1 = 0.45 results. The dataset and source codes are released for wide public access.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信