Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Medium.com:
Generating Code Coverage with PHPUnit and phpdbg
Sep 06, 2016 @ 17:36:23

In this post on his Medium page Elton Minetto shows how to generate the code coverage of your PHPunit tests with better performance using phpdbg.

In a previous post (in portuguese) I explained how to identify tests that are taking too long to execute. In this post, I’ll show you how to increase the performance of code coverage report generation using PHPUnit.

In the phpunit.xml file it’s possible to add configurations to generate reports related to the tests that are being executed. [...] In addition to changing the phpunit.xml file, to generate this information we also need to install the extension XDebug. However, by installing it we get a substantial decrease in performance.

He shows an example of the time difference in running the tests (about 1 minute without versus 22 with XDebug). He went looking for a better way and found this post talking about using phpdbg instead. He includes the "brew" commands to get everything you'll need installed and how to use phpdbg with your coverage calls rather than XDebug. However, as is pointed out at the end of the post, the results are slightly different but they're close enough to help you know what code to target next.

tagged: codecoverage phpunit phpdbg results performance tutorial

Link: https://medium.com/@eminetto/generating-code-coverage-with-phpunite-and-phpdbg-4d20347ffb45#.we2bst8uk

ThePHP.cc:
PHPUnit 4.8: Code Coverage Support
Aug 10, 2015 @ 13:48:52

Sebastian Bergmann has posted about some updates in the latest version of the PHPUnit PHP unit testing tool (v4.8) and changes in code coverage handling.

PHPUnit 4.8 introduces a couple of small improvements. For instance, the @testWith annotation was added as "syntactic sugar" for defining data providers and the --no-coverage commandline option was added for ignoring any code coverage configuration from the configuration file.

PHP_CodeCoverage, the library used by PHPUnit to collect, process, and report code coverage information, has been updated for PHPUnit 4.8. It can now collect code coverage information on PHP 7 without the need for a third-party extension such as Xdebug. And PHP_CodeCoverage's HHVM driver has been updated to reflect changes to how HHVM provides code coverage information.

He gets into a bit more detail about the updates to both the PHP 7 handling and changes for HHVM, including how to call it for PHP 7 (phpdbg vs just the normal CLI) and how HHVM no exposes its coverage information publicly. This makes it simpler for PHPUnit to grab the data without special handling code. He also looks ahead to PHPUnit 5, scheduled for release in October 2015, and that some functionality will be deprecated when the version is changed.

tagged: phpunit codecoverage support php7 hhvm changes phpdbg public

Link: https://thephp.cc/news/2015/08/phpunit-4-8-code-coverage-support

Three Devs & A Maybe Podcast:
PHP Internals, pthreads and PHPDBG with Joe Watkins
May 29, 2014 @ 15:48:54

In the latest episode of the Three Devs and a Maybe podcast, Episode #26, Michael Budd, Fraser Hart, Lewis Cains and Edd Mann share some opinions about the PHP internals mailing list, pthreads and the PHPDBG project (with guest and project developer >Joe Watkins).

This week we are very lucky to have Joe Watkins from pthreads and PHPDBG fame on the podcast. Starting off discussion with the 'PHP Next Generation' drama, we move on to wrap-up our thoughts on the 'Is TDD dead' set of Google Hangouts. The topic then shifts onto our guest and how he got into programming and PHP - with the creation of pthreads and PHPDBG projects discussed. Finally, we finish off the podcast with the regular quiz.

Other topics mentioned in this latest episode include the work being done on PHPNG, routing with regular expressions and the neural networks video lecture. You can listen to this latest episode either through the in-page player or by downloading the episode directly.

tagged: threedevsandamaybe podcast ep26 internals pthreads phpdbg

Link: http://threedevsandamaybe.com/posts/php-internals-pthreads-and-phpdbg-with-joe-watkins/

PHP Town Hall:
Episode 18: PHPDBG, HHVM and Internals
Jan 30, 2014 @ 15:15:19

The PHP Town Hall podcast has released their latest episode today - Episode #18, "PHPDBG, HHVM and Internals". This time the lineup includes Sara Golemon, a developer on the HHVM project, and Joe Watkins, a developer on the PHPDBG project.

Joe Watkins and Sara Golemon join Phil to make one hell of an episode. These two are not only core contributors to PHP, but are behind a lot of RFCs and decisions that make PHP considerably better. We talk about a whole bunch of awesome stuff, including progress of the named parameters RFC - and the chances of it making in, the new accepted PHP 5.6 feature PHPDBG and what it means for you, HHVM and its relationship to “The PHP”, wether PHP should have a spec for implementations of the language, and a whole bunch of other stuff.

You can listen to this latest interview in a few different ways - you can either listen with the in-page player, download the mp3 or you can watch the video of the live Google Hangouts recording.

tagged: phptownhall ep18 podcast phpdbg hhvm internals saragolemon joewatkins

Link: http://phptownhall.com//blog/2014/01/29/episode-18-phpdbg-hhvm-internals/


Trending Topics: