Generic Test Coverage/Result formats vs. NUnit and OpenCover

  • SonarQube Server
  • Enterprise Deployment
  • Trying to maximally exploit Code Coverage features

I’ve only recently started utilizing my company’s enterprise instance of SonarQube Server, plugging it into my Jenkins pipelines to analyze my .Net Framework projects.

I haven’t yet had a chance to dig much into the SonarQube analysis, as I’ve been in “check the box” mode.

Most of my struggle thus far has been trying to get the right tooling in place just to gather the necessary reports to pass to SQ for test results and code coverage. With that, in my latest iteration, I’ve been dealing with parsing errors in my generated (by NCrunch) NUnit and OpenCover reports.

As I’ve been struggling with this, I’ve come across the “Generic test data” help page. After poring over my generated reports, and seeing how verbose they are, I’m struck by how simple the generic report data that you support is.

My question in this regard is: does this limited amount of data satisfy all the needs for the analysis that SonarQube does in regard to test results and code coverage? To put it another way: are you only parsing out from the NUnit and OpenCover reports this limited subset of data, such that generating these reports themselves is actually superfluous, given I have all the required data in another form?

Hi,

Welcome to the community!

Let’s say the generic formats represent a minimum for what’s needed for coverage.

 
HTH,
Ann

Well, okay. It represents the minimum.

But does your OpenCover (or any other) parser attempt to extract any more than just the minimum?

I’m trying to gauge whether or not there’s any value in wrestling with my tooling to generate the more comprehensive reports.

My assumption, from looking at the generic data format, is that that’s all the data you use for the code coverage analysis; and also that, if there were more that you used, it would be available to set as additional optional data.

Hi,

That I can’t answer. I’m going to pass you over to the language experts.

 
Ann

Hey @marc.chu, sorry for the late response!
The generic test coverage report format parser supports the same features as the OpenCover parser: line and branch coverage.

Let us know if you have any problems with it!