Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Test Coverage #146

Open
milkshakeuk opened this issue Feb 15, 2021 · 2 comments
Open

Improve Test Coverage #146

milkshakeuk opened this issue Feb 15, 2021 · 2 comments

Comments

@milkshakeuk
Copy link
Member

milkshakeuk commented Feb 15, 2021

Of course, test coverage is not a measure of quality, however it does give you an idea of how much of the code is tested.

To that end the test coverage needs to be increased so any help adding tests would be very grateful.

@fredrikcarlbom
Copy link

I find Codacy being bad at visualizing where tests are needed. Could either the generated files be ignored so we can use it to get a good overview or do you have any opinion on where tests are most needed?

@milkshakeuk
Copy link
Member Author

@fredrikcarlbom for now I would look to add unit tests for the non source-generated projects, depending on your IDE and or IDE plugins you can get a good view of the coverage (I agree codacy doesn't visualise this very well).

If you use rider it has build in coverage, if you use VisualStudio with resharper this is also included.

image

Otherwise you can run a few commands to generate a report.

dotnet test nhapi.sln --collect:"XPlat Code Coverage" -r TestResults

Then use this dotnet tool to generate a html report which allows you to drill into the details, which looks something like this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants