News Feed
Jobs Feed
Sections




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

Zend Developer Zone:
Creating Code Coverage Statistics with xdebug
January 15, 2008 @ 07:51:00

The Zend Developer Zone has posted the fifth and final installment of the series Stefan Priebsch has written up about debugging your application via the XDebug software.

Today, we will have a look at another great feature of xdebug - creating code coverage statistics. Code coverage statistics show how many times each line of the code has been executed. Conversely, they also show which lines of code have not been executed, which is in fact much more interesting.

He talks a bit about what code coverage is and how it can help you fine tune your application. He walks you through the installation of the two packages that will help out with running the reports - phing and PHPUnit. Using these, he shows how to create a simple unit test and a build file for phing that combine and, via the XDebug calls to xdebug_start_code_coverage, xdebug_stop_code_coverage and xdebug_get_code_coverage, are used to generate the output graphs and stats in a nice, easy to read interface.

1 comment voice your opinion now!
xdebug tutorial debug phpunit codecoverage phing xdebug tutorial debug phpunit codecoverage phing


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: Implementing the Observer Pattern with SplObserver and SplSubject

Kevin Schroeder's Blog: Debugging a mobile app

Stefan Mischook's Blog: A Quick Look at Dreamweaver CS4 and the PHP Toolset

DevShed: Using Visitor Objects with MySQL Data Sets in PHP 5

Zend Developer Zone: Using Zend_Feed to Merge Multiple RSS Feeds


Community Events











Don't see your event here?
Let us know!


opinion unittest framework hhvm symfony2 hack podcast introduction code security overview facebook release example component composer language application package install

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework