'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.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source