I use spock to write test case and jenkins to run and publish my test cases. I was able to get the code coverage reported but sonar shows me only Java Unit test cases; the groovy test cases are totally missing
The following pom.xml is used as reference https://github.com/kkapelon/java-testing-with-spock/blob/master/chapter7/spring-standalone-swing/pom.xml
would anyone please know what I am missing ?
Add the following property in the pom file
<sonar.tests>src/test/groovy,src/test/java</sonar.tests>
If you do this both Spock and JUnit tests are shown correctly! See attached screenshot
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With