У меня относительно простой тестовый проект под Azure DevOps, и я хочу создать покрытие кода.
Это работает ... вроде. Я получаю это:
Я получаю нужные мне файлы (думаю, по крайней мере), но вкладка отсутствует.
I Выполните следующие три шага:
Выполните. NET тестовое задание. Установите генератор отчетов. Запустите генератор отчетов для преобразования (-reporttypes: HtmlInline_AzurePipelines; Cobertura ") publi sh result (s)
Но вкладка не отображается? Есть идеи?
- stage: Run_Unit_tests
jobs:
- job: 'Tests'
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
continueOnError: true
steps:
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install --tool-path . dotnet-reportgenerator-globaltool
displayName: Install ReportGenerator tool
- task: DotNetCoreCLI@2
displayName: Test .NET
inputs:
command: test
projects: '**/*Test/*.csproj'
arguments: '--configuration $(buildConfiguration) --logger trx --collect:"XPlat Code Coverage"'
condition: succeededOrFailed()
- task: reportgenerator@4
inputs:
reports: '$(Agent.TempDirectory)\**\coverage.cobertura.xml'
targetdir: '$(Build.SourcesDirectory)\coverlet\reports'
verbosity: 'Verbose'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.SourcesDirectory)\coverlet\reports\Cobertura.xml
failIfCoverageEmpty: false
reportDirectory: $(Build.SourcesDirectory)\coverlet\reports\
Я пробовал с генератором кода, без, включить переменную покрытия кода или отключить, пробовал с генератором отчетов и без ...