You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 30, 2018. It is now read-only.
At present, Humbug focuses solely on using xdebug, a prerequisite for generating code coverage. It’s essentially a symptom of old age – supporting PHP <5.6, and PHPUnit <5.0.
The requirement for code coverage is essentially a trade-off:
Xdebug will negatively impact performance of unit testing. Sometimes quite spectacularly.
Coverage creates a mapping of unit tests to source code lines, i.e. we can eliminate a lot of tests not applicable to a mutation, which is a significant performance boost.
As it turns out, eliminating significant number of tests is more than worth the cost of having xdebug. However, users would probably prefer not to have xdebug enabled, so it’s a pinch point for usage.
By bringing phpdbg in by default, where feasible, in place of xdebug and without requiring any special decision making by the user (i.e. having them remember to prefix phpdbg -qrr all the time), we can essentially have our cake and eat it too. The primary problem with xdebug (slowing down all unit tests, source code, and Humbug itself, and asking users to enable it) would be eliminated.
There would still remain a tradeoff in terms of coverage, since phpdbg and xdebug are not actually swappable without consequences. The reported coverage will usually differ. However, unless there is a serious shortfall in the data generated, having a few extra tests run on occasion should be a lot cheaper performance wise compared to having xdebug permanently bogging down every single test we execute.
The text was updated successfully, but these errors were encountered:
To give a comparison, on nelmio/alice Xdebug plus the whole test suite was taking about 20-30min in PHP 7.0. With phpdbg and disabling xdebug on PHP 7.1, it takes about 5min.
At present, Humbug focuses solely on using xdebug, a prerequisite for generating code coverage. It’s essentially a symptom of old age – supporting PHP <5.6, and PHPUnit <5.0.
The requirement for code coverage is essentially a trade-off:
As it turns out, eliminating significant number of tests is more than worth the cost of having xdebug. However, users would probably prefer not to have xdebug enabled, so it’s a pinch point for usage.
By bringing phpdbg in by default, where feasible, in place of xdebug and without requiring any special decision making by the user (i.e. having them remember to prefix
phpdbg -qrr
all the time), we can essentially have our cake and eat it too. The primary problem with xdebug (slowing down all unit tests, source code, and Humbug itself, and asking users to enable it) would be eliminated.There would still remain a tradeoff in terms of coverage, since phpdbg and xdebug are not actually swappable without consequences. The reported coverage will usually differ. However, unless there is a serious shortfall in the data generated, having a few extra tests run on occasion should be a lot cheaper performance wise compared to having xdebug permanently bogging down every single test we execute.
The text was updated successfully, but these errors were encountered: