Skip to content

docs: add code coverage goals to test/README.md #4978

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,16 @@
## Known issues

If you're using Windows and plan to run PDF tests, we **strongly** recommend also `pdftotext`. We experienced problems running tests without this. The best approach to do this is through [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/windows.html) (click [here](https://anaconda.org/conda-forge/pdftotext) to find out how to install this package with conda).


## Code Coverage

Code coverage helps ensure that our tests cover a sufficient portion of the codebase.
Our goal is to maintain at least **80% coverage** as reported by our coverage tools.

### Running Coverage Locally

To check coverage locally, use:

```bash
pytest --cov=cve_bin_tool --cov-report=html test/{TEST_FILE}.py

Check warning on line 193 in test/README.md

View workflow job for this annotation

GitHub Actions / Spell checking

`cov` is not a recognized word. (unrecognized-spelling)

Check warning on line 193 in test/README.md

View workflow job for this annotation

GitHub Actions / Spell checking

`cov` is not a recognized word. (unrecognized-spelling)
Loading