News Feed
Sections




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

Sebastian Bergmann's Blog:
Debugging with Git and PHPUnit
March 22, 2011 @ 13:04:15

Sebastian Bergmann has a recent post about how you can use git and PHPUnit to debug your application and find out when the offending code was added.

git bisect can be used to find the change that introduced a bug. It does so by performing a binary search on the list of commits between a known good and a known bad state of the repository. A tool such as PHPUnit can be invoked at each step of the binary search to check whether or not the current state is broken.

He gives an example of some failing tests where the return value isn't equal to what it should be. Finding the hash of the initial commit, he compares that with the "git bisect" command to point to the "good" and "bad" points in the timeline. Command line examples are also included in the post.

0 comments voice your opinion now!
debug git phpunit bisect unittest


blog comments powered by Disqus

Similar Posts

Michael Kimsal's Blog: Zend Framework starter kit zfkit.com

Sebastian Bergmann's Blog: PHPUnit 3.0 Beta 1

Dutch Web Alliance: The definitive remote debug and unittest with PHPStorm guide: part 3

Kevin Schroeder's Blog: ZendCon 2010 Podcast - Unit Testing in Zend Framework 1.8

Zumba Engineering Blog: Incorporating Mongounit into Multi-datasource Models with Traits


Community Events





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


symfony release artisanfiles interview library tool security list composer laravel introduction community conference version opinion framework podcast series language voicesoftheelephpant

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