CaptainCoderOrg / CapMan

A Pac Man Inspired Game for Learning and Fun!
3 stars 4 forks source link

Add Test Coverage #63

Closed DerekGooding closed 9 months ago

DerekGooding commented 9 months ago

Add some form of test coverage automation so we can identify what parts of the codebase aren't being tested.

Then we can create issues based on what tests are needed.

This closes #45

jcollard commented 9 months ago

This can now be done using the following commands:

dotnet test -p:CollectCoverage=true -p:CoverletOutputFormat=cobertura
reportgenerator -reports:CapMan.Tests/coverage.cobertura.xml  -targetdir:html-coverage-report/

You may need to install Report Generator: https://github.com/danielpalme/ReportGenerator

This can be done globally: dotnet tool install -g dotnet-reportgenerator-globaltool