Code Coverage
Warning
This page is primarily targeted at developers. If you are a normal user of this plugin, you can safely skip this section.
Prerequisites
To generate code coverage reports, you need to have:
- your PHPUnit test environment set up.
- the
xdebug
extension installed and enabled in your PHP environment.
Generating Coverage Reports
To generate code coverage reports, follow these steps:
- Run PHPUnit with coverage report:
XDEBUG_MODE=coverage vendor/bin/phpunit --colors --testdox --coverage-html /tmp/coverage --filter quiz_archiver/*
- Copy the generated report to your machin:
docker cp my-moodle-container:/tmp/coverage /tmp/coverage
- Open the report in your browser:
xdg-open /tmp/coverage/index.html