简体   繁体   English

为什么我没有在SonarQube中看到“单元测试覆盖”小部件的“单元测试成功”部分

[英]why am I not seeing “unit test success” section of “unit tests coverage” widget in SonarQube

I am following this tutorial - http://blog.dasberg.nl/getting-your-frontend-code-quality-in-order/ - to push the front end quality metrics to SonarQube. 我正在按照本教程 - http://blog.dasberg.nl/getting-your-frontend-code-quality-in-order/ - 将前端质量指标推送到SonarQube。 I was able to reuse the coverage report generated by Karma in Sonar but I don't see the section for "unit test success" at all. 我能够重用Karma在Sonar中生成的覆盖率报告,但我根本没有看到“单元测试成功”的部分。 This is how it looks in the sonar4.2 on my workstation 这就是它在我的工作站上的sonar4.2中的样子

单元测试覆盖小部件

and this is my sonar properties file 这是我的声纳属性文件

# Required metadata
sonar.projectKey=org.rj.js:javascript-build-process
sonar.projectName=javascript-build-process
sonar.projectVersion=1.0
# Comma-separated paths to directories with sources (required)
sonar.sources=src/js
# Language
sonar.language=js
# Encoding of sources files
sonar.sourceEncoding=UTF-8
sonar.dynamicAnalysis=reuseReports
sonar.junit.reportsPath=coverage/junit
sonar.javascript.lcov.reportPath=coverage/PhantomJS 1.9.7 (Mac OS X)/lcov.info
sonar.verbose=true

Also the log doesn't show any warnings or errors. 此外,日志不会显示任何警告或错误。 Am i missing anything else here? 我在这里错过了什么吗?

Indeed since SonarQube JavaScript PLugin version 1.5 it is not possible to import unit test results. 事实上,自SonarQube JavaScript PLugin 1.5版以来,无法导入单元测试结果。 See section Release Note in SonarQube documentation. 请参阅SonarQube文档中的发行说明部分。

This feature might be reintroduce in future version. 此功能可能会在将来的版本中重新引入。

For anyone still looking at this post, this feature was re-introduced in version 2.2. 对于仍然关注这篇文章的人来说,这个功能在2.2版本中重新引入。 It should work exactly the same way as it did before it was removed in version 1.5. 它应该与在1.5版中删除之前完全相同。

https://jira.sonarsource.com/browse/SONARJS-239 https://jira.sonarsource.com/browse/SONARJS-239

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM