Skip to content

Add coverage reporting #540

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

Closed
obestwalter opened this issue Jul 2, 2017 · 8 comments · Fixed by #604
Closed

Add coverage reporting #540

obestwalter opened this issue Jul 2, 2017 · 8 comments · Fixed by #604
Assignees
Labels
type:internal should have no impact on the user (refactoring, infrastructure, tools, etc.)

Comments

@obestwalter
Copy link
Member

obestwalter commented Jul 2, 2017

I am aware that there are different opinions about coverage, but to me it is a helpful data point, so I would like to add coverage reporting to our CI builds.

To me https://codecov.io looks good

@obestwalter obestwalter self-assigned this Jul 2, 2017
@The-Compiler
Copy link
Member

FWIW I use codecov for qutebrowser too and I'm quite happy with it.

@obestwalter obestwalter added type:internal should have no impact on the user (refactoring, infrastructure, tools, etc.) and removed enhancement labels Jul 16, 2017
@obestwalter
Copy link
Member Author

obestwalter commented Aug 31, 2017

Problem: A lot of the tests are run in a subprocess. There is a special wrapper class implementing that as part of the pytest plugin. Coverage needs to be made aware of that as described here.

I am still in the process of learning about it and trying to find out how others are dealing with this. At the moment I am tempted to circumvent the proposed and just bake it right into the wrapper by checking if this is a coverage run and then replacing the python invocation with a coverage run invocation. Don't know if good idea or stupid yet though.

@The-Compiler
Copy link
Member

Why not use pytest-cov which takes care of subprocess coverage automagically?

@obestwalter
Copy link
Member Author

Does it? Oh great. I wasn't aware of that. Thanks!

@obestwalter
Copy link
Member Author

obestwalter commented Aug 31, 2017

This plugin produces coverage reports. It supports centralised testing and distributed testing in both load and each modes. It also supports coverage of subprocesses.

Wow - first paragraph in the README :) I started reading through the coverage docs instead and from that angle it looks much more involved :)

@gaborbernat
Copy link
Member

yeah I use pytest-cov for all my projects, works great 👍

@obestwalter
Copy link
Member Author

Branch coverage would be nice but has a problem atm: pytest-dev/pytest-cov#168

keeping this open until resolved.

@obestwalter obestwalter reopened this Sep 5, 2017
@obestwalter
Copy link
Member Author

Found a workaround for that (pass config file on command line), so we can close this.

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:internal should have no impact on the user (refactoring, infrastructure, tools, etc.)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants