Code Coverage in CakePHP 1.2 Test Suite
Apr 30 2008
Super fresh in the SVN builds of CakePHP 1.2 is the new code coverage analysis. If you are living on the bleeding edge of cake development or just want a preview of the neat things to come once 1.2 is complete read on.
The guys at debuggable have contributed a fantastic tool to the testing suite for CakePHP 1.2. Code coverage reporting! It requires that you have Xdebug installed on your development machine. If you don’t have Xdebug installed you can get it from Xdebug . There are a ton of benfits from using Xdebug, from saving time to being able to profile scripts, it really is an essential development tool. If you haven’t tried it out you really owe it to yourself to give it a whirl. But enough gushing about Xdebug.
Code coverage reports
The code coverage reports in the the test suite provide quick svn diff like coverage reports of lines executed on the test subject during your test. The subject is auto-magically derived from the filename of the test. Yet another situation where adhering to naming conventions is beneficial. The code coverage report highlights what lines in the subject class were executed and what lines were not. A summary percentile is also provided, giving you an instant look at how much coverage your tests are providing. All in all some really useful tools that make testing and developing with cake easier and more to the point.
Categories
Recent Posts
- Creating easy reports with pivot tables
- Auth and ACL an end to end tutorial pt.2
- Auth and ACL an end to end tutorial pt. 1
- Introducing the Webservice Behavior
- More dogfood
- Eating my own dogfood Upgrading to CakePHP RC1
- CakePHP RC1 released
- PHP's isset() and arrays
- Contributing to your first open source project.
- Hacking the CakePHP FormHelper Adding Required Indicators
Comments
There are no Comments, Be the First!
Have Something to say?