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

Estimate code coverage for the current server codebase #729

Open
shankari opened this issue May 17, 2022 · 6 comments
Open

Estimate code coverage for the current server codebase #729

shankari opened this issue May 17, 2022 · 6 comments

Comments

@shankari
Copy link
Contributor

The current server codebase https://github.com/e-mission/e-mission-server
has automated tests https://github.com/e-mission/e-mission-server/tree/master/emission/tests
and continuous integration https://github.com/e-mission/e-mission-server/tree/master/.github/workflows

We would like to now estimate the code coverage of this test suite, with a view towards improving it in the future.
A potential code coverage tool is https://github.com/nedbat/coveragepy, but we should look at other options as well.

Ideally, the selected tool would have a GitHub action that we could use to compute the code coverage. We could display the current code coverage as a button (see below)
Screen Shot 2022-05-17 at 4 52 08 PM
and
even the difference as part of a pull request - e.g. something like https://josh-ops.com/posts/github-code-coverage/

This will allow us to maintain the coverage over time.

@shankari
Copy link
Contributor Author

@aGuttman, can you update this with the design decisions behind the choice of the code coverage tool? You could also document your findings as you explore the tool and choose config options so we know why the options were chosen.

@shankari
Copy link
Contributor Author

@aGuttman Here's a tool that converts code coverage reports into human readable text
https://reportgenerator.io/
It also seems to have a list of code coverage tools :)

@aGuttman
Copy link

It seems that basically everyone uses coverage.py/pytest-cov for python. Difficult to even find information about what else is out there.

@aGuttman
Copy link

Actions options:

I've barely used GitHub actions. I can get the simple stuff to work with my current knowledge, might need time to understand more involved actions but it does't look too bad. The community options look good to me, I don't feel like we need the fancy charts, and are still easy to use.

@shankari
Copy link
Contributor Author

shankari commented May 20, 2022

@aGuttman I agree with both your recommendations:

  • coverage.py/pytest-cov for the actual code coverage; it looks like we don't have a lot of choice anyway
  • community option for GitHub actions. I agree that they are good enough for what we need right now. We can always upgrade to the "freemium" version later. Note that we probably need to get approval before using a third-party commercial tool anyway.

Can you implement at least the first step and get the current code coverage before our meeting with the cloud folks on Monday?

@aGuttman
Copy link

Yes, definitely. Coverage is easy to use and I've been playing around with different actions in my fork so it all basically works already, I just need to settle on an implementation and hammer out any details along the way.

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

No branches or pull requests

2 participants