How do I get SonarQube to count spock/groovy unit tests?

孤街浪徒 提交于 2019-12-11 06:25:35

问题


I am trying to configure SonarQube to report an accurate count of the unit test cases in my repository, currently it is only showing the java jUnit test cases.

SonarQube reports the java jUnit test count as well as the overall coverage from jacoco which includes both java and groovy coverage.

How do I get SonarQube to recognize the groovy/spock unit tests in the overall count?

SonarQube 7.7 (I see the issue on 7.4 as well)

I am not sure if there is a specific sonar property I need to set in my Gradle configuration or if there is a plugin in SonarQube itself I need to install?

I do see some related answers about installing the Groovy plugin in SonarQube however there is no mention as to which version of SonarQube this is a solution for (I no longer see this plugin as available)


回答1:


The marketplace had been missing the Groovy plugin for quite some time. A new version has just been released!

Simply installing the plugin that is available on the Marketplace solved this problem.

https://github.com/pmayweg/sonar-groovy



来源:https://stackoverflow.com/questions/56674396/how-do-i-get-sonarqube-to-count-spock-groovy-unit-tests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!