Romanx / Cake.Coverlet

Coverlet extensions for Cake Build
MIT License
40 stars 15 forks source link

Unable to pass arguments to dotnet test when using Coverlet as a global tool #36

Closed vkoltachikhin closed 3 years ago

vkoltachikhin commented 3 years ago

Currently Cake.Coverlet doesn't provide a way to pass custom args to dotnet test when Coverlet is installed as a global tool. That makes it impossible to collect coverage and test results in one run (can't add --logger:"trx"). May be I'm missing something, correct me if I'm wrong.

Romanx commented 3 years ago

Hey there,

The reason for this is that there are a fixed number of settings for the coverlet global tool which we handle. You can find them here.

The --logger:"trx setting can only be passed to the dotnet test since it's a part of the VS test runner. If you look in the readme you can see how to run dotnet test with coverlet invoked using MSBuild and the cake overloads.

Hopefully this helps you.