C#C
C#4y ago
Morricore

How to exclude ef core migrations from coverage statistics? [solved]

I run
dotnet test .\BookStore.sln /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura
reportgenerator -reports:"tests\BookStore.IntegrationTests\coverage.cobertura.xml;tests\BookStore.Tests\coverage.cobertura.xml" -targetdir:"coveragereport" -reporttypes:Html

And migrations folders affects my coverage statistics. From what I understand better to hide them.
But
dotnet test .\BookStore.sln /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:ExcludeByFile=\"../BookStore.DataAccess/Migrations/*.cs"

not works.
Was this page helpful?