On PHPUnit and Software Metrics

Sebastian Bergmann » 06 February 2008 » in New Features » 0 Comments

Manuel Pichler's recent blog entry on PHP_Depend prompted me to write about my opinion on the future of software metrics and project mess detection in PHPUnit.

When I started to work on these projects, there was no other place for me then to develop them as part of PHPUnit. There was no phpUnderControl yet, and PHPUnit already had some utility classes that provided the neccessary infrastructure to quickly implement software metrics.

But the more I thought about it, I realized that these features do not belong into PHPUnit but into a suite of tools that PHPUnit is a well-integrated part of. However, given the fact that PHPUnit's development takes place in the open and people were already eagerly waiting for the software metrics and project mess detection support, I decided -- against my better judgement -- to release the functionality in question as part of PHPUnit 3.2.

Now that tools such as PHP_CodeSniffer get the attention they deserve and need and that tools such as phpUnderControl and PHP_Depend are being developed, I think it is time to take the software metrics functionality out of PHPUnit (see changeset 2377). This will not happen over night, though. The features in question will be marked as being deprecated for PHPUnit 3.3 before they will be removed in PHPUnit 3.4. Work has already begun (see changeset 2351) on the required integration between projects such as PHPUnit (which provides Code Coverage information in XML format) and PHP_CodeSniffer (which calculates, for instance, the Cyclomatic Complexity software metrics) so that phpUnderControl process these two inputs in order to calculate the Change Risk Analysis and Predictions (CRAP) index.
Defined tags for this entry: , , , ,

Trackback specific URI for this entry

0 Comments to "On PHPUnit and Software Metrics"

Display comments as (Linear | Threaded)
  1. No comments

3 Trackbacks to "On PHPUnit and Software Metrics"

  1. PHPDeveloper.org 08/02/2008 at 15:06
    In one of his latest entries, Sebastian Bergmann answers a question ...
  2. Manuel Pichler 18/06/2008 at 16:39
    This new release of PHP_Depend took some time to be finished. This is because the initial idea of a simple adaption of JDepend evolved (supported thru this blog-post by Sebastian), and so PHP_Depend has become a complete software metric application. Man
  3. blog.valiantys.com 29/07/2010 at 09:51

Add Comment


To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Submitted comments will be subject to moderation before being displayed.