From 7d8fed3c0de1428c563a7b543987c154488c79db Mon Sep 17 00:00:00 2001 From: Orkun Date: Mon, 2 Sep 2024 20:34:54 +0300 Subject: [PATCH] docs(contributing): add coverage report html section --- contributing.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/contributing.md b/contributing.md index 32d3c62a..438b86cb 100644 --- a/contributing.md +++ b/contributing.md @@ -17,7 +17,7 @@ You can just run `sh ./scripts/generate.sh` script and it will do all the work. To download fresh OpenAPI schema run `sh ./scripts/sync.sh` -## Creating Coverage Report +## Creating Coverage Report (Markdown) To generate a code coverage report in markdown format, follow these steps: @@ -32,6 +32,17 @@ To generate a code coverage report in markdown format, follow these steps: The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. +## Creating Coverage Report (HTML) + +To generate a code coverage report in HTML format, just run this command: + +Run PHPUnit with the `--coverage-html` option to generate a coverage report in Clover HTML format: +```shell +docker-compose run phpunit --coverage-html=cov/html +``` + +The markdown report will be saved in the cov/markdown/coverage_report.md file. You can open this file to review the coverage details. + ### Testing the local source code of the SDK Use the `run_checks.php` file to make API requests using the local version of the SDK.