This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Code coverage with SonarCloud for Maven multi-module project

 
Sheriff
Posts: 7660
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ranchers,

I've integrated SonarCloud with Maven project which is a multi-module project. During the build by Jenkins, I do get project analysed.

However, Code Coverage does not get produced. I have some understanding, that having jacoco-maven-plugin within the parent pom file isn't enough, and I need perhaps build coverage reports in each module, and only then in the parent pom somehow specify the location where to find each and every module's individual reports?

Am I thinking towards right direction?

Basically need some advice and tips what I should start researching. Did some already, but nothing concrete could find.

Appreciate for the help.
 
Liutauras Vilda
Sheriff
Posts: 7660
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A tutorial which you may tried or think is of a high quality would work well too. I just couldn't justify myself which one is a quality one and which one isn't.
 
Liutauras Vilda
Sheriff
Posts: 7660
522
Mac OS X VI Editor BSD Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems just after posting found something promising https://github.com/SonarSource/sonar-scanning-examples/tree/master/sonarqube-scanner-maven/maven-multimodule
 
Saloon Keeper
Posts: 12165
258
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Liutauras, take a look at the Blackjack repository on GitHub, of which you are also a member I believe. If I recall correctly, code coverage for a multi-module project worked fine there. I used TravisCI instead of Jenkins though.

Here's the link to the SonarCloud page: https://sonarcloud.io/dashboard?id=com.coderanch%3Ablackjack-parent

If you want admin access, let me know.
 
Liutauras Vilda
Sheriff
Posts: 7660
522
Mac OS X VI Editor BSD Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for a late reply. Thanks Stephan. Will look into that.

From the quick glance, I see that actual tests sitting just in one module, but not in others. Interesting how that would behave if tests were spread across more modules. But I guess I can easily check this out by pulling the project and adding some dummy tests to other module(s).

I'm going to work more on this today on my side, so will report back if I succeeded or at least to what extent got some success.

Thanks once again.
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic