ANSI Colors in PHPUnit Output

Sebastian Bergmann » 17 March 2008 » in New Features » 6 Comments

I finally gave in and implemented (optional) ANSI colors in PHPUnit's test runner output:
Green Bar: Test Success

Red Bar: Test Failure
This is a new feature in PHPUnit 3.3.
Defined tags for this entry: , ,

Trackback specific URI for this entry

6 Comments to "ANSI Colors in PHPUnit Output"

Display comments as (Linear | Threaded)
  1. gasper_k
    17/03/2008 at 20:46 Permalink
    Nice feature, far from being unimportant or useless, as some may think (it's just colors after all). I got lost many times in the monochrome output when multiple tests failed, so this will prove useful.

    Reply

  2. Doug Hill
    18/03/2008 at 01:05 Permalink
    I like it as gasper_k said it helps sort through output.

    Reply

  3. Daniel O'Connor
    18/03/2008 at 01:07 Permalink
    Hurray!

    Reply

  4. Max Horvath
    19/03/2008 at 08:33 Permalink
    I knew this feature would be cute :)

    See http://www.maxhorvath.com/2008/03/phpunits-terminal-output-could-be-more-fancy.html and http://www.maxhorvath.com/2008/03/phpunits-terminal-output-is-more-fancy.html ...

    Thanks and cheers!

    Reply

  5. Grant Palin
    19/03/2008 at 18:17 Permalink
    Nice one! I've got to upgrade my local instance now!

    I've been learning PHPUnit recently, and I am certain this little addition will increase the usability of the software when running it from the commandline.

    Reply

  6. Yaroslav
    29/05/2010 at 16:49 Permalink
    I'm tried on windows and it does not work :(

    Reply

1 Trackback to "ANSI Colors in PHPUnit Output"

  1. Blog of Max Horvath 19/03/2008 at 08:31
    Yes! Sebastian Bergmann did it: just one day after requesting a colorful output of PHPUnit's command line interface, he committed a patch to PHPUnit's trunk, which should be released with the next release.

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.