Coverlet returning 0 % coverage

732 Views Asked by At

I'm trying to use the coverlet tool in dotnet test to recieve coverage for my xunit test. the xunit test executes UI Automation tests using a tool called Rapise. Since coverlet works only with dotnet sdk style projects, i have converted the xunit test to dotnet sdk style cs project. Also i'm using a tool called reportgenerator to get coverage report in teamcity. I have modified my csproj file and added the necessary package references to coverlet and reportgenerator packages.

This is what my csproj file properties looks like after adding coverlet:

enter image description here

in teamcity server i'm executing the following code:

"C:\Program Files\dotnet\dotnet.exe" test D:\BuildAgent\work\workdir\Solution\XUnitTests.UITests1\UITests1.csproj --configuration Release --no-build --verbosity Normal /property:CollectCoverage=True /property:CoverletOutput=D:\BuildAgent\work\workdir\Solution\XUnitTests.UITests1\CoverageReport\UITests1.opencover.xml /property:CoverletOutputFormat=opencover

the test report format i'm using is opencover

this is the coverage i'm getting:

enter image description here

i have tried using dotcover before. it generates proper coverage but it tends to crash due to high memory usage. It's been 4 weeks now and i havent found a solution to this issue.

0

There are 0 best solutions below