Skip to content

Add test coverage#234

Closed
gribok wants to merge 6 commits into
ExpDev07:masterfrom
gribok:add-test-coverage
Closed

Add test coverage#234
gribok wants to merge 6 commits into
ExpDev07:masterfrom
gribok:add-test-coverage

Conversation

@gribok

@gribok gribok commented Mar 29, 2020

Copy link
Copy Markdown
Contributor

Based on #207, I added measuring for test coverage.

See example https://coveralls.io/github/gribok/coronavirus-tracker-api

Features:

  • Add section coverage-test to Makefile
    Basically everyone can run locally test cases with coverage measuring via make coverage-test.
    I will create .coverage-sqlite-file, which can be reviewed witch coverage report.
    $ make coverage-test
    [output ottmited]
    $ ls -a .coverage
    .coverage
    $ file .coverage
    .coverage: SQLite 3.x database
    $ coverage report
    Name                                Stmts   Miss  Cover
    -------------------------------------------------------
    [output ottmited]
    -------------------------------------------------------
    TOTAL                                 328     21    94%
  • Add coversalls to Travis-CI pipeline to visualize statement coverage in code.
  • Add coveralls badge to README
  • At every PR, coveralls will show the measuring

ToDos

  • Activate coveralls (https://coveralls.io/) from one maintainer
  • Thresholding is deactivated by default. It is possible to define threshold via settings of coveralls, if you switch into your branch.
    It makes sense to setup a threshold, that every new code should be merge with covered test cases

Please merge #205 first, to get a clear merge history.

Enjoy!

@gribok

gribok commented Mar 29, 2020

Copy link
Copy Markdown
Contributor Author

The after_success step in Travis-CI failed, because the access coveralls is not unlocked.

@Kilo59 Kilo59 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you've used the same branch for both of these PRs
#205

@Kilo59

Kilo59 commented Mar 30, 2020

Copy link
Copy Markdown
Collaborator

@gribok
I basically did the same thing on my fork as well.
Except I used the pytest-cov plugin instead of coverage directly.
https://coveralls.io/github/Kilo59/coronavirus-tracker-api
master...Kilo59:master

@gribok

gribok commented Mar 30, 2020

Copy link
Copy Markdown
Contributor Author

I am going to close the PR, seperate the changes for #169 and #207 in two branches and create new PRs based on mentioned issues.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants