coveragepy / coveragepy/coveragepy
Output coverage report using coverage.xml as source
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 525
- Avg merge
- 18h 27m
- Merged PRs (30d)
- 6
Description
Hopefully this feautre, or a quick alternative exists.
Is your feature request related to a problem? Please describe.
I would like to get the output of coverage report, but using coverage.xml as the source.
Describe the solution you'd like
coverage report --from-xml=true
Describe alternatives you've considered
None - please feel free to suggest some.
Full context
We are using gitlab-ci for our ci-pipeline (which is very nice). One of its features is the ability to store artifacts to be shared between jobs; I store my test-jobs coverage.xml.
To add a coverage badge in Gitlab, you need to add a regex to your project that scrapes the gitlab-ci job logs (ours is: ^TOTAL.+?(\d+\%)$). In practice, this method means you will need to run a job to output coverage after completing a pull request, because your coverage badge points to your master branch, and that's where it'll look for the output.
This is annoying, because we've already run our tests during the PR. Ideally, we would like to just add a job to run coverage report without having to re-run our test suite.
Scanned the docs and FAQ and couldn't find anything of relevance. Hopefully this exists and I've missed something basic :)
Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the coverage report command and inspect how it obtains coverage data and whether coverage.xml is already read anywhere. Done means the command can generate the report from an existing XML file, such as through the proposed --from-xml=true option, without rerunning tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100