ReportGenerator icon indicating copy to clipboard operation
ReportGenerator copied to clipboard

Native support for Microsoft.Testing.Platform?

Open martincostello opened this issue 1 month ago • 1 comments

I've been using the MSBuild task to run ReportGenerator after tests to generate coverage reports from dotnet test. I've then written some custom shared targets to easily plug everything into my projects. This has served me well for a while and I was happy with the setup.

However, when looking into the new Microsoft.Testing.Platform support in .NET 10 I discovered that there are no MSBuild hooks (https://github.com/microsoft/testfx/issues/6719#issuecomment-3391255494) to do this, so I've now got a bit of a hole in my CI setup that's preventing me from migrating repositories where I generate coverage to MTP without suffering from a lack of functionality.

Before having to re-introduce scripting to run things outside my build process, I wondered if maybe it would make sense for ReportGenerator to add native support for MTP to run inside dotnet test itself and produce reports at the end of a test run? MTP already has Visual Studio and AzDO support built-in (Test reports extensions) as well as JUnit, NUnit. xUnit also has built-in native support.

GitHubActionsTestLogger just added similar support, which would potentially enable an experience like this once the relevant NuGet packages was installed (arbitrary names for illustrative purposes):

dotnet test --report-coverage-html --report-coverage-github-markdown-summary

martincostello avatar Nov 24 '25 10:11 martincostello

@martincostello Thanks for the good idea!

I have to figure out how this scenario can be supported. It will take some time, since I'm really busy at the moment.

danielpalme avatar Nov 24 '25 18:11 danielpalme