How to cover ASP.NET Core Web API 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

  3. Finish coverage session:

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

Please sign in to leave a comment.

Have more questions?

Submit a request