• 文献检索
  • 文档翻译
  • 深度研究
  • 学术资讯
  • Suppr Zotero 插件Zotero 插件
  • 邀请有礼
  • 套餐&价格
  • 历史记录
应用&插件
Suppr Zotero 插件Zotero 插件浏览器插件Mac 客户端Windows 客户端微信小程序
定价
高级版会员购买积分包购买API积分包
服务
文献检索文档翻译深度研究API 文档MCP 服务
关于我们
关于 Suppr公司介绍联系我们用户协议隐私条款
关注我们

Suppr 超能文献

核心技术专利:CN118964589B侵权必究
粤ICP备2023148730 号-1Suppr @ 2026

文献检索

告别复杂PubMed语法,用中文像聊天一样搜索,搜遍4000万医学文献。AI智能推荐,让科研检索更轻松。

立即免费搜索

文件翻译

保留排版,准确专业,支持PDF/Word/PPT等文件格式,支持 12+语言互译。

免费翻译文档

深度研究

AI帮你快速写综述,25分钟生成高质量综述,智能提取关键信息,辅助科研写作。

立即免费体验

基于机器学习的测试异味检测。

Machine learning-based test smell detection.

作者信息

Pontillo Valeria, Amoroso d'Aragona Dario, Pecorelli Fabiano, Di Nucci Dario, Ferrucci Filomena, Palomba Fabio

机构信息

Software Engineering (SeSa) Lab - University of Salerno, Fisciano, Italy.

Software Languages (Soft) Lab - Vrije Universiteit Brussel, Brussel, Belgium.

出版信息

Empir Softw Eng. 2024;29(2):55. doi: 10.1007/s10664-023-10436-2. Epub 2024 Mar 5.

DOI:10.1007/s10664-023-10436-2
PMID:38456065
原文链接:https://pmc.ncbi.nlm.nih.gov/articles/PMC10914901/
Abstract

Test smells are symptoms of sub-optimal design choices adopted when developing test cases. Previous studies have proved their harmfulness for test code maintainability and effectiveness. Therefore, researchers have been proposing automated, heuristic-based techniques to detect them. However, the performance of these detectors is still limited and dependent on tunable thresholds. We design and experiment with a novel test smell detection approach based on machine learning to detect four test smells. First, we develop the largest dataset of manually-validated test smells to enable experimentation. Afterward, we train six machine learners and assess their capabilities in within- and cross-project scenarios. Finally, we compare the ML-based approach with state-of-the-art heuristic-based techniques. The key findings of the study report a negative result. The performance of the machine learning-based detector is significantly better than heuristic-based techniques, but none of the learners able to overcome an average F-Measure of 51%. We further elaborate and discuss the reasons behind this negative result through a qualitative investigation into the current issues and challenges that prevent the appropriate detection of test smells, which allowed us to catalog the next steps that the research community may pursue to improve test smell detection techniques.

摘要

测试坏味道是在开发测试用例时采用的次优设计选择的症状。先前的研究已经证明了它们对测试代码可维护性和有效性的危害。因此,研究人员一直在提出基于启发式的自动化技术来检测它们。然而,这些检测器的性能仍然有限,并且依赖于可调阈值。我们设计并试验了一种基于机器学习的新型测试坏味道检测方法,以检测四种测试坏味道。首先,我们开发了最大的手动验证测试坏味道数据集,以进行实验。之后,我们训练了六个机器学习器,并评估它们在项目内和跨项目场景中的能力。最后,我们将基于机器学习的方法与基于启发式的最新技术进行比较。该研究的主要发现报告了一个负面结果。基于机器学习的检测器的性能明显优于基于启发式的技术,但没有一个学习器能够克服51%的平均F值。我们通过对当前阻碍测试坏味道正确检测的问题和挑战进行定性调查,进一步阐述并讨论了这个负面结果背后的原因,这使我们能够梳理出研究界为改进测试坏味道检测技术可能采取的下一步措施。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/9ed7f6128869/10664_2023_10436_Fig7_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/ba6d6933920d/10664_2023_10436_Fig1_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/07d77796a6ea/10664_2023_10436_Fig2_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/71901458f007/10664_2023_10436_Fig4_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/b149d248ab83/10664_2023_10436_Fig5_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/91d889fbfce4/10664_2023_10436_Fig6_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/9ed7f6128869/10664_2023_10436_Fig7_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/ba6d6933920d/10664_2023_10436_Fig1_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/07d77796a6ea/10664_2023_10436_Fig2_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/71901458f007/10664_2023_10436_Fig4_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/b149d248ab83/10664_2023_10436_Fig5_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/91d889fbfce4/10664_2023_10436_Fig6_HTML.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/8879/10914901/9ed7f6128869/10664_2023_10436_Fig7_HTML.jpg

相似文献

1
Machine learning-based test smell detection.基于机器学习的测试异味检测。
Empir Softw Eng. 2024;29(2):55. doi: 10.1007/s10664-023-10436-2. Epub 2024 Mar 5.
2
On the adequacy of static analysis warnings with respect to code smell prediction.关于静态分析警告在代码异味预测方面的充分性。
Empir Softw Eng. 2022;27(3):64. doi: 10.1007/s10664-022-10126-5. Epub 2022 Mar 17.
3
Python code smells detection using conventional machine learning models.使用传统机器学习模型检测Python代码异味。
PeerJ Comput Sci. 2023 May 29;9:e1370. doi: 10.7717/peerj-cs.1370. eCollection 2023.
4
A study of dealing class imbalance problem with machine learning methods for code smell severity detection using PCA-based feature selection technique.一项使用基于主成分分析(PCA)的特征选择技术,运用机器学习方法处理代码异味严重程度检测中的类别不平衡问题的研究。
Sci Rep. 2023 Sep 27;13(1):16245. doi: 10.1038/s41598-023-43380-8.
5
Dynamic stacking ensemble for cross-language code smell detection.用于跨语言代码异味检测的动态堆叠集成方法。
PeerJ Comput Sci. 2024 Aug 15;10:e2254. doi: 10.7717/peerj-cs.2254. eCollection 2024.
6
Empirical study of the relationship between design patterns and code smells.设计模式与代码异味关系的实证研究。
PLoS One. 2020 Apr 16;15(4):e0231731. doi: 10.1371/journal.pone.0231731. eCollection 2020.
7
Software Code Smell Prediction Model Using Shannon, Rényi and Tsallis Entropies.使用香农熵、雷尼熵和Tsallis熵的软件代码异味预测模型
Entropy (Basel). 2018 May 17;20(5):372. doi: 10.3390/e20050372.
8
Integration of design smells and role-stereotypes classification dataset.设计坏味道与角色刻板印象分类数据集的整合。
Data Brief. 2021 May 8;36:107125. doi: 10.1016/j.dib.2021.107125. eCollection 2021 Jun.
9
Evaluation of Machine Learning Techniques for Traffic Flow-Based Intrusion Detection.基于流量的入侵检测的机器学习技术评估。
Sensors (Basel). 2022 Nov 30;22(23):9326. doi: 10.3390/s22239326.
10
Static test flakiness prediction: How Far Can We Go?静态试验片状剥落预测:我们能走多远?
Empir Softw Eng. 2022;27(7):187. doi: 10.1007/s10664-022-10227-1. Epub 2022 Oct 1.

引用本文的文献

1
A Survey of Sound Source Localization and Detection Methods and Their Applications.声源定位与检测方法及其应用综述
Sensors (Basel). 2023 Dec 22;24(1):68. doi: 10.3390/s24010068.

本文引用的文献

1
Static test flakiness prediction: How Far Can We Go?静态试验片状剥落预测:我们能走多远?
Empir Softw Eng. 2022;27(7):187. doi: 10.1007/s10664-022-10227-1. Epub 2022 Oct 1.
2
Interrater reliability: the kappa statistic.组内一致性:kappa 统计量。
Biochem Med (Zagreb). 2012;22(3):276-82.
3
What is a support vector machine?什么是支持向量机?
Nat Biotechnol. 2006 Dec;24(12):1565-7. doi: 10.1038/nbt1206-1565.
4
Assessing the accuracy of prediction algorithms for classification: an overview.评估分类预测算法的准确性:综述
Bioinformatics. 2000 May;16(5):412-24. doi: 10.1093/bioinformatics/16.5.412.
5
The use and interpretation of the Friedman test in the analysis of ordinal-scale data in repeated measures designs.弗里德曼检验在重复测量设计中对有序尺度数据进行分析时的应用与解读。
Physiother Res Int. 1996;1(4):221-8. doi: 10.1002/pri.66.