create a makefile target for running tests with code coverage and visualize them #40
Labels
enhancement
New feature or request
good first issue
Good for newcomers
hacktoberfest
help wanted
Extra attention is needed
the golang language has the feature to create and display code coverage of unit- tests
Task:
research about this interesting feature
create a makefile target like
make coverage
this will execute tests with code coverageBy default we don't need it , so we will have
make coverage
andmake test
will run without coverage. The make coverage will rungo test
with some flagsthis task should create an html golang report and then open a fenster in web-browser to visualize it.
rationale:
We don't want to enable codecoverage or similar in travis or CI because codecovarage can be a really wrong metric for running in PRs or automation.
We just want to use code coverage from time to time to see what we could perhaps cover but there should be a human analyzing it.
As use-case could be:
As dev I run
make coverage
and this will open automatically the browser fenster to the code-coverage of golang in htmlThen I can analyze from time to time what perhaps isn't covered by tests. ( we can't cover everything by tests since we don't have binary).
The code-coverage thing should be manual human process .
The text was updated successfully, but these errors were encountered: