Sonar-dotnet with Unit test details soon to be released!

Hi there, .NET developers!

We will soon release a new version of our .NET analyzers that finally include Unit test details.

This is a change that has been requested for a long time, so we are very happy to finally be able to make it available. This feature supports MSTest, NUnit and XUnit.

Please note this comes with some warnings :

  • We now parse the full unit test report files, and map individual tests. However, by default we do not report on generated code. If you tests are generated, they will not be taken into account. This means the number of reported tests may go down. If you have a quality gate condition on this metric you might encounter a failed quality gate because of that.
  • SonarQube will now calculate the test density metric for .NET tests (which it could not do before). If you had a quality gate condition on this metric, you might encounter a failed Quality Gate (but it is arguably normal, as the value will now be calculated properly for .NET code).
    Please review your quality gate conditions and update them appropriately.

As always, please send us your feedback!

Denis

2 Likes