microsoft / microsoft/aspire

Code coverage reporting using popular tools does not work with Aspire.Hosting.Testing

Open
#8,499 12 comments 34 reactions 0 assignees View on GitHub
area-app-testing
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

When using Aspire.Hosting.Testing to run integration tests, and using [coverlet.msbuild](https://github.com/coverlet-coverage/coverlet) we had no coverage reported for our tests, regardless of what code they exercised. This reduces the value of the tests that otherwise provide a great amount of value by exercising our system front-to-back.

### Describe the solution you'd like

It would be useful if coverage tooling that already exists would just work ™, however I appreciate that given how different running an application in Aspire/DistributedApplicationFactory is from something like WebApplicationFactory, that may be unworkable.

I think whatever the solution, it will require some collaboration with the maintainers of coverage tooling.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.