Microsoft recently released improvements to the Microsoft Testing Platform, enhancing the reporting capabilities for .Net applications. This article was certainly written by AI and has a lot of content, but not a good example to follow. I had some time, so I got it working and have an example to share.
These improvements look promising for larger projects with a lot of tests (you have automated tests right?).
This will probably change as they are still working on these packages.
Microsoft Learn - Testing Platform Test Reports has more documentation and a few images.
--report-ado, --report-gh
--report-azdo-demote-known-flaky - “turns known flaky failures into warnings”--report-azdo-slow-test-history - “compares each test against its own past”--list-tests json emits a schema-versioned document describing every discovered test, down to its source location”Pipeline Yaml
- ${{ if eq(parameters.mtp, 'true') }}:
- script: |
dotnet test \
${{ parameters.rootFolder }}/*Tests/*.csproj \
--configuration ${{ parameters.buildConfiguration }} \
--verbosity normal \
-- \
--coverage \
--coverage-output "$(Agent.TempDirectory)/coverage.cobertura.xml" \
--coverage-output-format cobertura \
--report-trx \
--report-html \
--report-azdo \
--publish-azdo-test-results \
--report-azdo-upload-artifacts files
displayName: 'Run tests and collect coverage (MTP)'
# if a test fails or all pass I want to see the Test tab, --publish-azdo-test-results doesn't seem to run (8/14/26, maybe it will get better)
- task: PublishTestResults@2
displayName: 'Publish test results (MTP)'
condition: succeededOrFailed()
inputs:
testResultsFormat: VSTest
testResultsFiles: '*.trx'
searchFolder: '$(System.DefaultWorkingDirectory)/TestResults'
failTaskOnFailedTests: false
failTaskOnMissingResultsFile: false
- task: PublishCodeCoverageResults@2
displayName: 'Publish Code Coverage'
# comment this out if you don't want to see the Code Coverage tab on any test failures
condition: succeededOrFailed()
inputs:
summaryFileLocation: '$(Agent.TempDirectory)/**/*.cobertura.xml'
failIfCoverageEmpty: false
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" Version="10.9.0" />
<PackageReference Include="Microsoft.Testing.Extensions.AzureDevOpsReport" Version="2.3.3" />
<PackageReference Include="Microsoft.Testing.Extensions.HtmlReport" Version="2.3.3" />
<PackageReference Include="NSubstitute" Version="6.2.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.10.0" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="2.3.3" />
<PackageReference Include="Microsoft.Testing.Platform" Version="2.3.3" />
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Api.csproj" />
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
<ItemGroup>
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Project>
<Project>
<PropertyGroup>
<!-- Enable the Azure DevOps reporter -->
<EnableMicrosoftTestingReporterAzureDevOps>true</EnableMicrosoftTestingReporterAzureDevOps>
<!-- Enable slow test detection using history -->
<EnableMicrosoftTestingSlowTestHistory>true</EnableMicrosoftTestingSlowTestHistory>
<!-- Optional: Configure the threshold (default is usually 2x) -->
<TestingExtensionsAzureDevOpsSlowTestThreshold>2</TestingExtensionsAzureDevOpsSlowTestThreshold>
<!-- Optional: Configure the minimum runs required -->
<TestingExtensionsAzureDevOpsSlowTestMinimumRuns>5</TestingExtensionsAzureDevOpsSlowTestMinimumRuns>
</PropertyGroup>
</Project>
See my updated template line 75.

Check out my Resources Page for referrals that would help me.