RunCoverletReport icon indicating copy to clipboard operation
RunCoverletReport copied to clipboard

feat: use runsettings file

Open cdessana opened this issue 2 years ago • 2 comments

What?

Add option to use a runsettings file that should be located on solution root folder

Why?

This is a important feature to allow a more specific test configuration for each solution. In my case, I needed to exclude autogenerated files from code coverage, such as grpc files. As they are generated at each build it was not possible to use the annotation [ExcludeFromCodeCoverage].

Microsoft recommends the use of therunsettings file in case the test requires special configurations. Coverlet also supports runsettings files to set up advanced options.

It also would be useful to Issue #9

How?

  • Added a new option on OptionPageGrid named "UseRunSettings"
  • In case the option is set true, try to find a runsettings file on solution folder
  • Use this file as a argument to the test command.

cdessana avatar Jun 04 '22 21:06 cdessana

This is exactly what my team and I need to use this great extension. We use the runsettings file to exclude test that take too long to run locally so we want to avoid them being run, otherwise we would just use the option "Exclude Assemblies File Patterns". To be able to pass in a runsettings file, and exploit the TestCaseFilter element therein would solve our problem nicely!

PunkUnicorn avatar Oct 13 '22 12:10 PunkUnicorn

Yes - looking at this - I need this functionality in my life. Any chance it get pushed soon?

timold avatar Oct 13 '22 13:10 timold