-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Spread the word about fast code coverage via "pcov" extension #5531
Comments
pcov
extension
What are the advantages of |
No overhead related to debugger functionality makes |
One small step which could be done is mentioning |
Given how old this thread is you probably either already are using PCov or have decided not to use it, but the main advantage over PHPDbg in my experiences is not the speed (it is faster) but memory usage. PCov uses less memory than Xdebug or PHPDbg, the latter by a significant margin, and also happens to be faster than both (the former by a significant margin) |
I've just tested this with the .phar based setup. It didn't work for me. I guess it's the included phpunit which is still version 6.5.14. So it either phpunit in the phar should be updated or it should be mentioned that pcov doesn't work with the phar setup. |
I'm not familiar with the .phar install, do you mean the install for php 5.6 or the current .phar release for 7.x? I agree a note should/could be added able PCOV not working with PHP 5.6, it requires PHPUnit 8.0+ which doesn't support < 7.2. |
I refer to the 7.x release (the one you get with On a sidenote: If you install with |
Huh, that's odd but understandable I suppose. The .phar install can't exactly upgrade it's dependencies so using the most compatible version of PHPUnit is probably the safe route. |
I'm currently using this dockerfile:
This makes a big unit test suite running time go from 131 seconds to 13 seconds! |
What are you trying to achieve?
Let users know that Codeception 3 brings not only PHPUnit 8.x support, but also blazing-fast code coverage via krakjoe/pcov thanks to this bad boy sebastianbergmann/php-code-coverage#663
What do you get instead?
pcov
is not mentioned anywhere 😞Details
The setup is so simple, even your grandma can do it:
pcov
extension following these instructionsphp.ini
xdebug
by commenting out the linezend_extension=xdebug.so
pcov
by addingextension=pcov.so
andpcov.enabled = 1
Now, if you want code coverage, run
vendor/bin/codecept --coverage-html
And if you need to debug some stuff, run
php -d zend_extension=xdebug.so vendor/bin/codecept
This will help #1446, #4524, and also make lots of people really happy!
The running time of my tests with enabled code coverage went from 11 minutes down to 20 seconds.
The text was updated successfully, but these errors were encountered: