coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.97k stars 386 forks source link

Different results between local and Azure DevOps #235

Closed lurumad closed 4 years ago

lurumad commented 5 years ago

Hi folks,

I run into something strange. When I run my tests in my local machine I received these results:

local

When I run in Azure DevOps I received these results:

vsts

Same number of tests (118) same code. Do you have any ideas?

Regards

WiredUK commented 5 years ago

How many test projects do you have? What commands do you run locally and on AD?

lurumad commented 5 years ago

Hi @WiredUK

One project for functional tests (we have another for unittests but we are trying to isolate the problem).

In local I run this command:

dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=c:\temp\final.xml /p:Exclude="[XXX.YYY.WebHost]*" /nodereuse:false

In Azure DevOps

- task: DotNetCoreCLI@2
  displayName: 'dotnet functional tests'
  inputs:
    command: test
    projects: 'test/FunctionalTests/FunctionalTests.csproj'
    arguments: '/p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=$(Build.ArtifactStagingDirectory)/results/final.xml /p:Exclude="[XXX.YYY.WebHost]*" /nodereuse:false'

Regards!

MarcoRossignoli commented 4 years ago

@lurumad any news? Feel free to close if solved

MarcoRossignoli commented 4 years ago

Close for stale, feel free to re-open if needed.