如何获得SonarQube来计算spock/groovy单元测试? [英] How do I get SonarQube to count spock/groovy unit tests?

查看:327
本文介绍了如何获得SonarQube来计算spock/groovy单元测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试配置SonarQube以报告我的存储库中的单元测试用例的准确计数,当前它仅显示java jUnit测试用例.

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报告了Java jUnit测试计数以及jacoco的总体覆盖率,其中包括Java和groovy覆盖率.

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

如何使SonarQube识别总计数中的常规/spock单元测试?

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

SonarQube 7.7(我也在7.4上看到了这个问题)

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

我不确定是否需要在Gradle配置中设置特定的声纳属性,或者是否需要安装SonarQube本身中的插件?

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?

我确实看到了有关在SonarQube中安装Groovy插件的一些相关答案,但是没有提及这是针对哪个版本的SonarQube的解决方案(我不再看到此插件可用)

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)

推荐答案

该市场已经有一段时间没有使用Groovy插件了.新版本刚刚发布!

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

只需安装Marketplace上可用的插件即可解决此问题.

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

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

这篇关于如何获得SonarQube来计算spock/groovy单元测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆