Skip to main content
QUICK REVIEW

[论文解读] Machine Learning Techniques for Software Quality Assurance: A Survey

Safa Omri, Carsten Sinz|arXiv (Cornell University)|Apr 29, 2021
Software Engineering Research参考文献 78被引用 8
一句话总结

本综述回顾了用于软件质量保障的机器学习技术,重点在于缺陷预测与测试用例优先级排序。它指出深度学习通过捕捉代码语义显著提升了缺陷预测的性能,同时表明诸如神经网络和贝叶斯网络等机器学习方法可显著提高测试用例优先级排序的效率,同时保持较高的缺陷检测率。

ABSTRACT

Over the last years, machine learning techniques have been applied to more and more application domains, including software engineering and, especially, software quality assurance. Important application domains have been, e.g., software defect prediction or test case selection and prioritization. The ability to predict which components in a large software system are most likely to contain the largest numbers of faults in the next release helps to better manage projects, including early estimation of possible release delays, and affordably guide corrective actions to improve the quality of the software. However, developing robust fault prediction models is a challenging task and many techniques have been proposed in the literature. Closely related to estimating defect-prone parts of a software system is the question of how to select and prioritize test cases, and indeed test case prioritization has been extensively researched as a means for reducing the time taken to discover regressions in software. In this survey, we discuss various approaches in both fault prediction and test case prioritization, also explaining how in recent studies deep learning algorithms for fault prediction help to bridge the gap between programs' semantics and fault prediction features. We also review recently proposed machine learning methods for test case prioritization (TCP), and their ability to reduce the cost of regression testing without negatively affecting fault detection capabilities.

研究动机与目标

  • 分析机器学习在软件质量保障中应用的最新进展,特别是缺陷预测与测试用例优先级排序方面。
  • 识别传统基于特征的缺陷预测方法的局限性,例如无法捕捉结构相似但语义不同的代码之间的差异。
  • 评估深度学习在生成语义感知特征方面的有效性,以提升缺陷预测的准确性。
  • 评估用于减少回归测试成本的测试用例优先级排序的机器学习技术,同时不降低缺陷检测效果。

提出的方法

  • 对100余项关于机器学习在软件质量保障中应用的研究进行系统性回顾,重点关注缺陷预测与测试用例优先级排序。
  • 对传统特征(如代码复杂度、代码变更量、过程度量)在缺陷预测中的应用进行分类,并分析其在捕捉语义方面的局限性。
  • 评估深度学习模型(如自编码器、循环神经网络、代码嵌入)从源代码中学习语义表示的能力,以提升特征的区分度。
  • 对测试用例优先级排序中应用的机器学习技术进行调研,包括神经网络、贝叶斯网络、遗传算法和强化学习。
  • 分析用于基于历史失败数据、执行覆盖率或缺陷检测潜力对测试用例进行排序的代理函数。
  • 比较分类算法(SVM、朴素贝叶斯、K近邻、逻辑回归)与聚类方法(k-means)在测试用例优先级排序中的表现。

实验结果

研究问题

  • RQ1传统软件度量在预测易出错模块方面的表现如何?其在捕捉语义差异方面的局限性是什么?
  • RQ2深度学习模型在从源代码中学习语义表示方面,能在多大程度上提升缺陷预测性能?
  • RQ3在减少回归测试时间方面,哪些机器学习技术在测试用例优先级排序中最为有效?
  • RQ4测试用例优先级排序中的代理函数与实际缺陷检测效果之间存在何种相关性?
  • RQ5结合静态分析、代码度量与机器学习的混合方法是否能提升预测准确性?

主要发现

  • 传统缺陷预测特征(如代码复杂度和代码变更量度量)无法区分语法结构相同但语义不同的代码,从而限制了预测的准确性。
  • 深度学习模型通过从源代码中学习语义表示,显著提升了缺陷预测性能,使功能不同但语法相似的代码区域能够更好地区分。
  • 神经网络和贝叶斯网络是测试用例优先级排序中最有效的技术之一,在缺陷检测速度和覆盖率方面优于传统方法。
  • 强化学习和主动学习方法在生成自适应测试用例排序方面展现出潜力,可在资源受限条件下最大化缺陷检测效果。
  • 结合静态分析结果与机器学习特征的混合模型,在预发布缺陷预测中的准确性高于仅使用代码度量的模型。
  • 遗传算法和基于聚类的方法为测试用例优先级排序提供了可扩展的替代方案,尤其适用于计算需求高的大型测试套件。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。