82615

Where does Sonarqube collects data from?

Question:

Last day I was configuring a jenkins job to run sonar on my java project. I had sonar and jacoco plugins configured in my job. Sonar was throwing some error for which my sysadmin asked me to remove the jacoco plugin configuration from job. I removed and now sonar is saying it cannot find cobertura.xml. So I am curious to know if sonar does analysis on already run jacoco or cobertura task or does it runs its own coverage analysis?

Answer1:

Short answer : In general, coverage is imported to SonarQube by reading a coverage report generated prior to any work of sonarQube.

Longer answer : Historically (read, about two years ago), SonarQube used to try to run coverage tool for java. This was a nightmare to maintain for every use cases and as such it is now up to the developers to provide a coverage report to SonarQube which will only act on those data (linking them to source, compute metrics, display them nicely).

In your case, that means you most probably have the cobertura plugin installed on your SQ instance and it is looking for a report to import.

Recommend

  • Angular 2 + Karma + karma-jspm + karma-coverage + typescript report phantomJS failure
  • Sonar-Cobertura custom filters
  • cobertura report
  • cobertura graph in hudson
  • How do I revert sys.stdout.close()?
  • How to override List.Add method?
  • python: forcing relative imports to search from script file
  • Jenkins Grails plugin does not list lastest versions of Grails
  • Iron Router: How do I send data to the layout?
  • What is the correct way to synchronize a shared, static object in Java?
  • uml Composition relationships to RDF and OWL
  • Is there some graphical way to create my own configuration file on SonarLint?
  • Javascript, Regex - I need to grab each section of a string contained in brackets
  • How to disable all widgets inside Panel or inside Composite?
  • How do I signal completion of my dataflow?
  • How to generate and display a QR Code in ionic 2
  • Convert Type Decimal to Hex (string) in .NET 3.5
  • Spring Cloud Microservice Architecture Confusion
  • Install PHP intl extension on MacOS
  • Parsing a CSV string while ignoring commas inside the individual columns
  • With Hadoop, can I create a tasktracker on a machine that isn't running a datanode?
  • Play WS (2.2.1): post/put large request
  • Avoid links criss cross / overlap in d3.js using force layout
  • How can I send an e-mail from a vbs script
  • Regex thinks I'm nesting, but I'm not
  • What is the “return” in scheme?
  • Deserializing XML into class C#
  • Updated Ionic CLI but shows previous version (Windows)
  • Jquery - Jquery Wysiwyg return html as a string
  • Arrays break string types in Julia
  • Is there a mandatory requirement to switch app.yaml?
  • How to disable jQuery.jplayer autoplay?
  • WPF Applying a trigger on binding failure
  • Java static initializers and reflection
  • How can I remove ASP.NET Designer.cs files?
  • python draw pie shapes with colour filled
  • Is there any way to bind data to data.frame by some index?
  • How can i traverse a binary tree from right to left in java?
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS