This directory contains code coverage reports generated by kcov for the OpenEMR entrypoint scripts.
- It can be configured to work with any flex or production docker.
- Currently configured to work with the
flex-edgephp 8.4 images (both development (ie. dev) mode (codebase via shared volume) and production (ie. prod) mode (codebase via git clone)) and the future production7.0.4image. See .github/workflows/test-flex-edge.yml and .github/workflows/test-production.yml for details respectively. - The GitHub Actions workflow builds the pertinent Docker image with the
kcovtarget, which includes the Kcov code coverage tool. - The container runs with a wrapper script that executes the original
openemr.shentrypoint script under kcov monitoring. - Kcov collects coverage data on which lines of code were executed in the entrypoint script.
- After tests complete, the coverage reports are uploaded as artifacts in the GitHub Actions workflow.
- Go to the GitHub Actions run for your build.
- Click on the "Artifacts" section.
- Download the
kcov-coverage-reports-productionorkcov-coverage-reports-flex-devorkcov-coverage-reports-flex-prodartifact(s). kcov-coverage-reports-productionis currently produced by future production docker 7.0.4.kcov-coverage-reports-flex-devis currently produced by flex-edge PHP 8.4 docker in dev mode.kcov-coverage-reports-flex-prodis currently produced by flex-edge PHP 8.4 docker in prod mode.- Extract the archive and open
index.htmlin your web browser.
The coverage reports include:
- Line-by-line coverage information for the entrypoint scripts
- Summary statistics showing coverage percentages
- Visual indicators showing which code paths were executed
To run the container locally with coverage enabled, use run-with-coverage.sh script.
cd docker/openemr
. run-with-coverage.shAfter running, you can view the coverage reports in docker/openemr/coverage-reports/.