dotCover integrated in Rider does not cover integration tests when using Aspire.Testing template
Basically what the title says. When running code coverage in Rider it shows that API coverage is 0%. You can look at this github repo. But if I run the coverage report using the dotnet dotcover tool it shows the coverage.
dotnet dotcover test --dcReportType=HTML
.NET 9
MacOS 15.1.1 (24B91)



Please sign in to leave a comment.
thank you for contacting us.
Could you please collect log files for us: https://dotnettools-support.jetbrains.com/hc/en-us/articles/206545979-How-to-get-dotCover-logs ?
You can upload it here: https://uploads.jetbrains.com/
Thank you!
Rider dotCover “Cover All Tests” covers only the ReSharper xUnit test runner process. In Aspire integration tests, the ASP.NET Core API resource is launched as a separate process by DistributedApplicationTestingBuilder, and controller/service execution in that process is not represented in the coverage snapshot. Api appears only because the test process directly executes some shared API infrastructure types.
This is the session log
The ‘Api’ symbol should have ~70% coverage, that 1% is just those shared API infrastructure types/methods called directly from ‘Api.IntegrationTests’
Hi,
Could you please try installing the latest Rider EAP and check if the issue persists?
Looking forward to hearing from you!
Just recreated in EAP to similar effect,
Not interested in the change in 'AppHost' and 'Api.IntegrationTests' coverage, just that 'Api' is still at 1%
With further investigation, this is a known issue tracked under DCVR-12881 DotCover does not work on Aspire Integration Tests. There is no immediate plan to implement it. You can vote for it and subscribe to receive updates. We will update the issue if there is any progress.
Thanks,
Tom