The code coverage should be simple – just run tests and that’s all,right ?
For a reason,the coverlet console,dotnet-coverage,dotnet test do not work – means that code coverage generated was 0% ( I have verified with dotnet-reportgenerator-globaltool )
The only that worked was altCover and this is the code into the yml:
dotnet test --no-build src/backend/Net6/NetTilt/NetTilt.sln /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="Humanizer|Moq|NUnit3|System|DB2GUI|AltCover|NetTilt.Tests"
It was a good exercise. And now I have this:
And for some tests written already,the code coverage is 46 %. A good one,I think …
Tools used
Moq
NUnit3
AltCover
Visual Studio
Leave a Reply