Skip to content

Use coverage to measure code coverage in unit and e2e tests#302

Merged
QuanMPhm merged 1 commit into
CCI-MOC:mainfrom
QuanMPhm:185/coverage
Jun 3, 2026
Merged

Use coverage to measure code coverage in unit and e2e tests#302
QuanMPhm merged 1 commit into
CCI-MOC:mainfrom
QuanMPhm:185/coverage

Conversation

@QuanMPhm

@QuanMPhm QuanMPhm commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

As part of #185. I've added usage of coverage with minimum coverage goals. I expect these goals to be increased after we merge in the unit tests that @marcoagonzales007 is writing for the mentioned issue.

@QuanMPhm QuanMPhm requested review from knikolla, larsks and naved001 June 1, 2026 15:26
Comment on lines +32 to +34
coverage run --source="." -m pytest process_report/tests/e2e/test_e2e_pipeline.py -v -s --log-cli-level=INFO
coverage combine
coverage html --fail-under=85 --omit "process_report/tests/**,process_report/util.py,process_report/institute_list_validate.py"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than running coverage explicitly, you can install the pytest-cov plugin to have coverage run as part of your pytest invocation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having trouble trying to get pytest-cov to properly cover the e2e test. It is not covering the subprocess created during the test. I'll just merge this PR as it is for now. I may look at using pytest-cov in the future

@QuanMPhm QuanMPhm merged commit 5062aef into CCI-MOC:main Jun 3, 2026
6 checks passed
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

Successfully merging this pull request may close these issues.

3 participants