How to cover web application with dotCover CLT

  1. Start the coverage of dotnet running the app (after "--" pass arguments for dotnet executable):

    .\dotCover.exe dotnet --StartInstance=1 --output=AspNetCoreWebAPI.html --ReportType=HTML -- run --project C:\path\to\application\SampleWebApiAspNetCore\SampleWebApiAspNetCore.csproj
    
  2. Interact with the app on its URL. For example, for Swagger at https://localhost:7124/swagger/index.html
    Selenium scripts can also be run at this stage.

  3. Finish coverage session:

    .\dotCover.exe send --Instance=1 --Command=GetSnapshotAndKillChildren
    
1 out of 2 found this helpful
1 comment

Hello,

 

We were using this approach with the dotCover Command-Line Tool version 2023.3.2 (linux-x64), and it worked fine.

We have decided to upgrade to version 2025.2.2. But there is only Cross Platform version available.
The official documentation still shows that this approach to cover Web Applications with dotCover CLT is available:
https://www.jetbrains.com/help/dotcover/Remotely_Cover_a_Web_Application.html
But another documentation page with a full list of Console Runner Commands doesn't contain such commands:
https://www.jetbrains.com/help/dotcover/dotCover__Console_Runner_Commands.html
The 2025.2.2 - Cross Platform (tar.gz) archive does not contain dotCover.exe, and the dotCover.README.md file in the Resources folder of the archive also does not have any mentions of such commands like --Instance=1 or --Command=GetSnapshotAndKillChildren.
 

Is this documentation still valid?
Could you please describe a new approach to cover Web Applications with dotCover CLT?

1

Please sign in to leave a comment.

Have more questions?

Submit a request