I am trying to get the code coverage in the azure pepeline for the solution which should include the code coverage for my nunit test project also. However it’s not working below is my yml change.
# Run tests with Coverlet code coverage and include the test project in coverage results
- task: DotNetCoreCLI@2
displayName: 'Run Tests'
inputs:
command: 'test'
projects: '**/Warsy.Fulto.Test.csproj'
arguments: |
--configuration $(buildConfiguration)
--collect:"XPlat Code Coverage"
/p:Include="[Warsy.Fulto.Test]*"
--verbosity detailed
# Publish code coverage results
- task: PublishCodeCoverageResults@2
displayName: 'Publish CodeCoverage'
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
1