-
ALM used : Azure DevOps
-
CI system used : Azure DevOps - Bash script running on Ubuntu
-
Scanner command used :
dotnet sonarscanner begin -o:"****" -k:WindwardAdapter.API -d:sonar.host.url="https://sonarcloud.io" -d:sonar.token="****" -d:sonar.projectBaseDir="$(pwd)/" -d:sonar.cs.vscoveragexml.reportsPaths="WindwardAdapter.UnitTests/TestResults/**/*.coverage"
-
Languages of the repository : C#
-
Error observed :
WARN: Could not find any coverage report file matching the pattern 'WindwardAdapter.UnitTests/TestResults/**/*.coverage'
I cannot get sonar to detect my coverage file, despite trying all conceivable options to provide its location.
its actual location (guid is variable):
“/home/ben/buildagents/agent1/_work/1001/s/Softsure.Microservices/Communication/Microservices.WindwardAdapter/WindwardAdapter/WindwardAdapter.UnitTests/TestResults/e96bd7e2-7a95-47c1-b87a-d684f1264544/IntegrationTests.coverage.coverage”
the directory of the sonar execution is :
/home/ben/buildagents/agent1/_work/1001/s/Softsure.Microservices/Communication/Microservices.WindwardAdapter/WindwardAdapter
The format of the coverage file is VS Coverage XML , despite the file extension being .coverage (it is not binary)
I’ve tried Four different options for the vscoveragexml.reportsPaths , all without success
Could not find any coverage report file matching the pattern 'WindwardAdapter.UnitTests/TestResults/**/*.coverage'.
Could not find any coverage report file matching the pattern '**/WindwardAdapter.UnitTests/TestResults/**/*.coverage'.
Could not find any coverage report file matching the pattern '/WindwardAdapter.UnitTests/TestResults/**/*.coverage'
Could not find any coverage report file matching the pattern '/home/ben/buildagents/agent1/_work/1001/s/Softsure.Microservices/Communication/Microservices.WindwardAdapter/WindwardAdapter/WindwardAdapter.UnitTests/TestResults/**/*.coverage'.
its worth adding that some of the options do work when running on Windows Subsystem for linux , but not on Ubuntu.