Ingesting EclEmma Coverage files

Must-share information (formatted with Markdown):

  • which versions are you using SonarQube LTA 9.9.5 with Scanner 5.0.1.3006
  • how is SonarQube deployed: Dedicated VM server
  • what are you trying to achieve: Ingest EclEmma multiple Coverage XMLs
  • what have you tried so far to achieve this - Able to ingest the files, but it appears that the overall coverage statistics only show the last results from the last file ingested. Each EclEmma XML coverage file contains coverage from a different suite of unit tests, so I would expect as I ingested each set the overall code coverage would go up; however, it appears that on my overall page, the coverage goes down over time.
    My sonar-scanner is set to scan the entire code base each time, so I can pick up any changed code, but the ingestion of the EclEmma code coverage report is for a different subset each time.

So two basic questions:

  1. is there a way to tell sonar-scanner to include multiple coverage.xml files on a single run
    or
  2. do I need to change the scanner to only match the code that was impacted by the latest unit tests (EclEmma coverage file)

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

We don’t directly support EclEmma, so it’s not clear to me how you’re importing those reports. That said,

 
HTH,
Ann

Thank you Ann,
Our existing build pipeline has a EclEmma unit test processor. enabling it to to export the XML file allows us to import into sonarqube’s UI

Michael

Hi Michael,

So you’re exporting JaCoCo-style reports? And passing them all in to the same analysis in a comma-delimited list? If so, could you share the analysis configuration?

 
Ann

Thanks Ann, That was what I needed. I am able to run them as a comma delimited list. running a test now.

1 Like