wp-cli-tests
wp-cli-tests copied to clipboard
Behat code coverage improvements
In #234 we added Behat code coverage support which works great except for a few minor issues.
See also this related Slack discussion.
Incorrect autoload require statement here:
https://github.com/wp-cli/wp-cli-tests/blob/16ee1c9ad7443a1a3ba8a48341f13dc74efc1083/utils/generate-coverage.php#L16-L18
The path is wrong.
Class mismatch
Sometimes SebastianBergmann\CodeCoverage\ProcessedCodeCoverageData is loaded but SebastianBergmann\CodeCoverage\Data\ProcessedCodeCoverageData is expected (or the other way around?). That means somehow some older versions of that class are loaded. Needs investigating.
Very slow tests
Behat tests with coverage reporting take much longer to process. In the case of entity-command the job is even cancelled after 6 hours because it's still not finished.
We should look into improving this. Maybe pcov is faster than xdebug. Or we split up the job into multiple ones to run in parallel (see https://github.com/wp-cli/wp-cli-tests/pull/189)