testfx icon indicating copy to clipboard operation
testfx copied to clipboard

New MSTest runner doesn' t integrate with coverlet

Open MarkusRodler opened this issue 8 months ago • 8 comments

Previously I used dotnet test /p:CollectCoverage=true with coverlet.msbuild to produce an coverage output on the command line like that:

+--------+------+--------+--------+
| Module | Line | Branch | Method |
+--------+------+--------+--------+
| Maui   | 0%   | 100%   | 0%     |
+--------+------+--------+--------+
| Shared | 0%   | 0%     | 0%     |
+--------+------+--------+--------+
| Client | 0%   | 100%   | 0%     |
+--------+------+--------+--------+
| Test   | 0%   | 0%     | 0%     |
+--------+------+--------+--------+

+---------+------+--------+--------+
|         | Line | Branch | Method |
+---------+------+--------+--------+
| Total   | 0%   | 0%     | 0%     |
+---------+------+--------+--------+
| Average | 0%   | 50%    | 0%     |
+---------+------+--------+--------+

But with the new MS Test runner this isn't possible anymore. It would be nice that this feature is restored. Or if someone has an alternative that shows the coverage for each module.

MarkusRodler avatar Jun 27 '24 08:06 MarkusRodler