Skip to main content
QUICK REVIEW

[论文解读] Empirical Analysis of Factors and their Effect on Test Flakiness - Practitioners' Perceptions

Azeem Ahmad, Ola Leifler|arXiv (Cornell University)|Jun 3, 2019
Software Engineering Research参考文献 44被引用 9
一句话总结

本研究通过在四个北欧产业中开展多案例研究,调查了从业者对测试脆弱性的感知,识别出23个影响脆弱性的因素——分为测试质量、软件质量、实际脆弱测试以及公司特定因素四类。主要贡献在于提出了一套基于从业者经验的脆弱性因素框架,参与者之间达成86%的一致性,强调应优先采用预防性指南而非事后检测来应对脆弱测试。

ABSTRACT

Developers always wish to ensure that their latest changes to the code base do not break existing functionality. If test cases fail, they expect these failures to be connected to the submitted changes. Unfortunately, a flaky test can be the reason for a test failure. Developers spend time to relate possible test failures to the submitted changes only to find out that the cause for these failures is test flakiness. The dilemma of an identification of the real failures or flaky test failures affects developers' perceptions about what is test flakiness. Prior research on test flakiness has been limited to test smells and tools to detect test flakiness. In this paper, we have conducted a multiple case study with four different industries in Scandinavia to understand practitioners' perceptions about test flakiness and how this varies between industries. We observed that there are little differences in how the practitioners perceive test flakiness. We identified 23 factors that are perceived to affect test flakiness. These perceived factors are categorized as 1) Software test quality, 2) Software Quality, 3) Actual Flaky test and 4) Company-specific factors. We have studied the nature of effects such as whether factors increase, decrease or affect the ability to detect test flakiness. We validated our findings with different participants of the 4 companies to avoid biases. The average agreement rate of the identified factors and their effects are 86% and 86% respectively, among participants.

研究动机与目标

  • 理解从业者在真实工业环境中的测试脆弱性感知。
  • 识别出超出测试异味(test smells)之外、从业者认为会增加、减少或影响脆弱性检测的因素。
  • 通过在多家公司中验证发现,以减少偏差并增强结果的普适性。
  • 探讨不同行业中脆弱性感知的差异及其对测试质量实践的影响。
  • 为基于从业者经验开发软件测试中的预防性策略提供基础。

提出的方法

  • 在四个来自不同行业的北欧公司中开展多案例研究。
  • 通过在线调查、面对面研讨会和现场访问收集数据,以捕捉从业者的感知。
  • 将影响测试脆弱性的23个因素识别并归类为四个领域:软件测试质量、软件质量、实际脆弱测试以及公司特定因素。
  • 通过不同参与者的独立研讨会验证发现结果,以减少偏差并确保共识。
  • 将识别出的因素与现有文献进行映射,以验证其与已知测试原则的一致性。
  • 采用定性与定量分析方法,评估参与者之间的一致性比率(因素为86%,影响也为86%)。

实验结果

研究问题

  • RQ1不同行业中的从业者如何感知测试脆弱性?
  • RQ2从业者认为除测试异味外,哪些因素会影响测试脆弱性?
  • RQ3这些因素如何影响脆弱测试的检测或发生?
  • RQ4从业者对所识别因素及其影响的一致性程度如何?
  • RQ5公司特定的实践如何塑造对测试脆弱性的感知?

主要发现

  • 识别出23个影响测试脆弱性的因素,分为四个领域:软件测试质量、软件质量、实际脆弱测试以及公司特定因素。
  • 参与者对所识别因素的平均一致率为86%,对其影响的一致率同样为86%,表明存在强烈共识。
  • 从业者将脆弱测试视为测试用例设计不良、环境波动以及组织实践的结果,而不仅仅是代码异味所致。
  • 例如,'网页组件运行时生成'这一因素在一家公司被视为高度脆弱,而在另一家则不然,凸显了感知的上下文依赖性。
  • 研究发现,感知到的脆弱性受工作经历、观察到的失败以及组织文化影响,而不仅仅是技术产物。
  • 从业者强调,脆弱测试本质上是测试用例质量的问题,通过设计指南进行预防比事后检测更为有效。

更好的研究,从现在开始

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

无需绑定信用卡

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