Sonarqube 和 Cucumber 特性
Sonarqube and Cucumber features
有什么方法可以在 SonarQube 分析中包含 Cucumber 特性的测试覆盖率和其他有用的统计数据吗?我做了一些研究,但找不到合适的插件。
来自 this thread(写在 OP 的问题之后),David Racadon 补充道:
As far as I understand:
- It is not possible to run an analysis on a project containing only test code because the '
sonar.sources
' property is mandatory.
- Measures on test code are not aggregated at project level.
As far as I am concerned, I consider test files part of the project the same way source files are. Thus, measures of test files should be aggregated on top of source files.
For now, SonarQube shows that your project is 1,000 lines even if you have 0 or 10,000 lines of test code on top of those 1,000 lines of source code. For me, SonarQube gives you a biased estimate of the size of your project and the effort of maintenance.
最接近的是他的插件 racodond/sonar-gherkin-plugin
其中:
- 分析 Cucumber Gherkin feature files 和:
- 计算指标:代码行数、场景数量等
- 检查各种指南,通过 40 多次检查找出潜在的错误和代码异味
- 提供编写自己的支票的能力
有什么方法可以在 SonarQube 分析中包含 Cucumber 特性的测试覆盖率和其他有用的统计数据吗?我做了一些研究,但找不到合适的插件。
来自 this thread(写在 OP 的问题之后),David Racadon 补充道:
As far as I understand:
- It is not possible to run an analysis on a project containing only test code because the '
sonar.sources
' property is mandatory.
- Measures on test code are not aggregated at project level.
As far as I am concerned, I consider test files part of the project the same way source files are. Thus, measures of test files should be aggregated on top of source files.
For now, SonarQube shows that your project is 1,000 lines even if you have 0 or 10,000 lines of test code on top of those 1,000 lines of source code. For me, SonarQube gives you a biased estimate of the size of your project and the effort of maintenance.
最接近的是他的插件 racodond/sonar-gherkin-plugin
其中:
- 分析 Cucumber Gherkin feature files 和:
- 计算指标:代码行数、场景数量等
- 检查各种指南,通过 40 多次检查找出潜在的错误和代码异味
- 提供编写自己的支票的能力