Sonar-dotnet: Remove `sonar.cs.mstest.reportsPaths` from plugin coverage documentation

Created on 1 Aug 2019  路  6Comments  路  Source: SonarSource/sonar-dotnet

https://docs.sonarqube.org/latest/analysis/coverage/ advertises a "sonar.cs.mstest.reportsPaths" property, but it doesn't appear to work and I didn't find any reference to that property in your source code either (see https://github.com/SonarSource/sonar-dotnet/blob/master/sonar-dotnet-shared-library/src/main/java/org/sonarsource/dotnet/shared/plugins/UnitTestResultsProvider.java#L42).

If I rename mstest to vstest (sonar.cs.vstest.reportsPaths) it works great however. The latter causes "Sensor C# Unit Test Results Import" to appear in the logs but the former does not.

All 6 comments

Hi @IGx89 . Both sonar.cs.vstest.reportsPaths and sonar.cs.mstest.reportsPaths are mentioned on the docs page you gave. If sonar.cs.vstest.reportsPaths works for you, it means you are using VSTest to run the unit tests.

Could you please tell me in more detail what the problem is and how we could improve the documentation?

Hi! In a nutshell, I'm saying that I don't believe the sonar.cs.mstest.reportsPaths option would work for anyone, based on both my personal testing and analysis of your source code (see link above). If you set that parameter, even if the file isn't a valid MSTest report, it should still have a log entry saying it was looking for it: it doesn't.

Steps to Reproduce:

  1. Run a SonarScanner-MSBuild scan, setting sonar.cs.mstest.reportsPaths to a file (shouldn't matter if it's valid MSTest or not)

Expected Behavior:

  • An entry in the console output saying "Sensor C# Unit Test Results Import", along with details on the import

Actual Behavior:

  • No "Sensor C# Unit Test Results Import" entry in the console output -- exact same behavior as if the parameter wasn't specified.

Thanks a lot, @IGx89 - I confirm we don't support that and we have to update the documentation. I appreciate your answers.

I opened a PR in SonarSource/sonar-enterprise#2126

fixed

Was this page helpful?
0 / 5 - 0 ratings