-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behat code coverage improvements #241
Comments
Another one in doctor-command:
In that package, doctor-command uses a very old version ( |
Another thing I think is not working: wp-cli-tests/src/Context/FeatureContext.php Line 697 in 16ee1c9
Putting the --require first seems to break alias commands, because aliases are only extracted from $argv[0] so they must be the first thing after wp I noticed when testing failures like:
So maybe that should go at the end of the command? |
I knew the regex approach was risky 😬 At the end of the command there could be pipes etc. too, so need to be careful there as well. Maybe we could use one of the special env vars we support to load this really early? |
I was thinking of |
We could probably figure out how to handle pipes, for example if we split on pipe characters and then applied the preg_replace which already checks that it is a wp command, then put it back together. Here is a quick test
with output:
|
Thinking again... We could add support for |
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:
wp-cli-tests/utils/generate-coverage.php
Lines 16 to 18 in 16ee1c9
The path is wrong.
Class mismatch
Sometimes
SebastianBergmann\CodeCoverage\ProcessedCodeCoverageData
is loaded butSebastianBergmann\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 #189)
The text was updated successfully, but these errors were encountered: