David van Rensburg
David van Rensburg

Reputation: 1

DotCover: Duplicate the "Cover Application" UI feature in the command line

I have a .Net 5 project with 3 services that in one solution. In another solution I have a set of integration tests. I need to get a test coverage report using DotCover. I can do this fairly easily using the UI in Visual Studio 2022 by opening the solution with the services, and going: Extensions => Resharper => Cover => Cover Application and adding my service's DLL and clicking start (repeating this for both services), then running the tests in the other solution, clicking "Get Snapshot and Wait", and then merging the snapshots.

The problem is I need to script this process. I can run the tests easily enough with

dotnet dotcover test <path to test binary>

And I can script the merging of the snapshots and generating of the reports. But how do I duplicate the "Cover application" part, wait for the tests to run and then generate the snapshots.

Upvotes: 0

Views: 89

Answers (1)

nzeemin
nzeemin

Reputation: 961

You definitely can do

dotnet dotcover test <path to .sln file>

and have coverage for all tests in the given solution.

Upvotes: 0

Related Questions