Generic test data ignores certain files in a final report

Hi,

I have converted F# cubertura test coverage report to generic test data Generic test data but certain files are not included in the final report (but they do exist in a generic xml file and have correct paths):


Here is an xml:
SonarQube.zip (9.1 KB)

Can’t share full logs but when xml is being ingested the message is:


and the number 36 matches the number of files in the xml file.

Sonarqube version is 9.9.0

Any idea what is going wrong?

Kind regards

Hey there.

Just to make sure I’m understanding correctly – is the issue that certain files are not appearing in SonarQube, or that those files are appearing in SonarQube but have no coverage associated with them?

the generic test coverage file that I have shared above (SonarQube.xml) has correct representation of the lines covered. I also made sure that path attribute points to the existing and correct file. The problem is that despite this and despite Sonarqube claiming it ingested coverage data for all 36 files (as per screenshot above) it does not show any data for, for example, Foundation.Integration.Core.CsvSynchronization.fs (as per screenshot above). However it still detects at least some files (for instance in the Foundation.Storage project)

Example of test coverage not being reported at all for the whole project:


Example of test coverage not being reported for one file only in the whole project

Let me know if there is something i can explain further,

Kind regards,
Bartek

Thanks.

I’m conscious of the fact that SonarQube doesn’t natively support F#. Are you using a community-supported plugin, such as this one? GitHub - jmecosta/sonar-fsharp-plugin: F# SonarQube (TM) plugin - support for F#

I’m asking because it’s these plugins that are responsible for feeding many measures to SonarQube. I’m not sure what would happen if you provide a generic coverage report, but something went wrong with the parsing of certain files by the Community plugin.

That being said, I don’t expect any data to be shown for files like EnumData.fs because they are absent in the coverage report you shared.

Howver, one like Foundation.Integration.Core/ErrorFormating.fs would be interesting to drill into since it is represented in the coverage report.

I would suggest looking for any references to this file in your analysis logs (at DEBUG level, sonar.verbose=true)

Thank you Colin. Is there anything particular that you would recommend looking for? There probably is a lot of information to search through.
Also, wasn’t generic data format Generic test data supposed to handle any language? If that is the case, why would I need an Fsharp community plugin in the first place?

I would suggest you start by looking for any references to that file in the logs of analysis. There shouldn’t be a lot of them.

In order for Generic Test/Coverage Data to be imported on file, that language must be supported by SonarQube (either natively or through a community-supported plugin). There is an open ticket about this: SONAR-12015

That’s why I’m asking if (or which) community plugin you’re using.

Hi Colin, thank you for your post and sorry for the late response.

We have Sonar Community F#: Code Analyzer for F#: GitHub - jmecosta/sonar-fsharp-plugin: F# SonarQube (TM) plugin - support for F#.

I will try to get hold on logs but I think there is a discrepancy between this plugin supported version SonarQube 8.x and our installed sonarqube version 9.9.0. Do you think it can be the cause?