This project is a demo of combining some testing tools for C#/.NET Core:
The demo is about applying unit testing on a very simple Stack structure.
git clone <the repo>
cd SimpleStack.Tests
dotnet test
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:CoverletOutput=./lcov.info
If you have installed Coverage Gutters on your Visual Studio Code
, you can see the coverage visualization.
opencover is needed for ReportGenerator to generate coverage report. To get the opencover result, run:
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
dotnet ReportGenerator_4.0.15\ReportGenerator.dll "-reports:coverage.opencover.xml" "-targetdir:coverage-report"
Go ahead to open SimpleStack.Tests\coverage-report\index.htm
to see our awesome report.