SonarC# fails when parsing xUnit test results with empty <assembly> tags #406
Labels
Area: SQ Plugin
Java plugin related issues.
Type: Bug
Exceptions and blocking issues during analysis.
Milestone
Description
We are using the Jenkins SonarQube Scanner for MSBuild with xUnit and OpenCover. When we are running the scanner on all our projects and one of the projects is still under the developer with no added tests or tests are not marked correctly, the analysis fails to complete. There is an exception being thrown because xUnit creates empty
<assembly>
tags for assemblies found with no tests.Repro steps
MSBuild.SonarQube.Runner.exe end
Expected behavior
Empty elements should be ignored.
Actual behavior
Exception is thrown and analysis is incomplete
org.sonar.plugins.dotnet.tests.ParseErrorException: Missing attribute "total" in element <assembly> in C:\Temp\TN-alpha_it\xunit-results.xml at line 103
Jenkins Console:
Known workarounds
Add filters to to prevent the assembly from being scanned by xUnit.
Related information
SonarC# Version
5.11 (build 1761) installed
Visual Studio Version
Visual Studio 2015/ Visual Studio 2017
If running through the Scanner for MSBuild, its version
SonarQube Scanner for MSBuild 2.3.2
The text was updated successfully, but these errors were encountered: