Skip to content

[Discussion]dotnet test/vstest support for .NET Framework scenarios #2299

Closed
@MarcoRossignoli

Description

@MarcoRossignoli

Today coverlet is usable through 3 drivers:

msbuild /p:CollectCoverage=true VSTasks
dotnet test --collect:"XPlat Code Coverage" vstest integration
coverlet .Net tool

one of most requested feature is the possibility to run coverage solution wide and have a single file with all coverage.
Today we support merge only with msbuild driver, but the support is not so good, as you know msbuild build project and not solution so the way we expose this feature is not user friendly and works only if you've the knowledge of msbuild internals https://github.com/tonerdo/coverlet/blob/master/Documentation/Examples/MSBuild/MergeWith/HowTo.md. That -m:1 is ugly.

So we're discussing about the possibility to shutdown msbuild support(keep only important fix of current features) and move all community to collectors.
Simultaneously add all needed feature to the dotnet tool, for instance subcommands for merge reports and analyze coverage thresholds.

In this way we'll have a single and well supported(all other way are affected by this issue https://github.com/tonerdo/coverlet/blob/master/Documentation/KnowIssues.md#1-vstest-stops-process-execution-earlydotnet-test) way to do coverage.
Again if something is missing on vstest We/I can help with implementation, for instance maybe there is way to know when all tests ends and we can do merge directly, another improvement could be avoid runsettings file for args(users doesn't like add new file but love msbuild switch parameters), and so on.

Unfortunately msbuild is today the most used way to consume coverlet and it's used also for .NET Framework scenarios https://nugettrends.com/packages?months=12&ids=coverlet.msbuild&ids=coverlet.collector&ids=coverlet.console so we would like to know if all we can do with msbuild we can also do with dotnet test/vstest.

I suppose that dotnet driver can handle only new project sdk style and doesn't fallback on old driver for old format.

What do you think?Are there too much unsupported scenario?

cc: @vagisha-nidhi @AbhitejJohn @singhsarab @nohwnd @petli @tonerdo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions