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

RFE: figure out how to measure code coverage for unit test #29

Closed
tisnik opened this issue Jun 16, 2017 · 7 comments
Closed

RFE: figure out how to measure code coverage for unit test #29

tisnik opened this issue Jun 16, 2017 · 7 comments

Comments

@tisnik
Copy link
Member

tisnik commented Jun 16, 2017

No description provided.

@tisnik tisnik self-assigned this Jun 16, 2017
@fridex
Copy link
Contributor

fridex commented Jun 16, 2017

I use codecov.io in selinon - see selinon/selinon#29 for a report example. It's easy to setup and gives nice stats.

@tisnik
Copy link
Member Author

tisnik commented Jun 16, 2017

Oh very cool @fridex . Do you think it would be possible to use it in ./runtests.sh (let's say when I set some flag or environment variable)? It would be very nice to have such numbers in test reports :)

@fridex
Copy link
Contributor

fridex commented Jun 16, 2017

I use a py.test extension pytest-cov ( see https://github.com/codecov/example-python#pytest for an example) where you specify just path to a python package [1]. I think this should be doable for api unit tests and for worker unit tests as well. We will need to register at codecov.io to get this.

[1] https://github.com/selinon/selinon/blob/master/Makefile#L34

@fridex
Copy link
Contributor

fridex commented Jun 16, 2017

@tisnik I've added fabric8-analytics to codecov - any member from this org can access codecov just by signing in with GitHub account. Feel free to contact me if any issue spotted.

EDIT: link is https://codecov.io/gh/fabric8-analytics

@tisnik
Copy link
Member Author

tisnik commented Jun 16, 2017

IIRC the codecov.io is a site that just displays test results acquired from the local machine/Jenkins instance, right? So we still need to generate the report. I'll look at it.

@fridex
Copy link
Contributor

fridex commented Jun 16, 2017

IIRC the codecov.io is a site that just displays test results acquired from the local machine/Jenkins instance, right? So we still need to generate the report. I'll look at it.

Yes, the report is aggregated locally but it is sent to codecov.io - see py.test plugins. Thanks!

@samuzzal-choudhury
Copy link
Contributor

This issue was moved to openshiftio/openshift.io#837

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

3 participants