"Web interface" to PHPUnit tests?

Is there a simple "Web interface" to running PHPUnit test suites? i.e. a PHP script that runs the test on the command line, and outputs a nicely formatted HTML result.

I develop web applications, and the day-to-day workflow usually switches between the IDE and the browser. I would like to have the unit testing in the same environment.

I'm looking for something really simple and PHP based - I am planning to get into phpUnderControl (which has the functionality I'm looking for) but not yet.


I recently discovered Visual PHPUnit which looks like a very very nice interface for everyone that doesn't want to run PHPUnit from the command line:

Visual PHPUnit

It seems to be the next iteration of @Matt's PHPUnit Test Report


I feel your frustration - I'm a UI guy myself. Looking at the terminal too long makes my head spin. I wrote a quick little application that you might find helpful.

PHPUnit test application
(source: mattmueller.me)

You can find it here: http://mattmueller.me/blog/introducing-phpunit-test-report

Cheers! Matt


After several hours of researching recently, the best PHPUnit web frontend I have come across was https://github.com/NSinopoli/VisualPHPUnit


You can use phing to run a PHPUnitTask and then convert the output with:

  • PHPUnitReport - This task transforms PHPUnit xml reports to HTML using XSLT.

Example:

<phpunitreport infile="reports/testsuites.xml" 
    format="frames" 
    todir="reports/tests" 
    styledir="/home/phing/etc"/>

See phpunit --help for the various output formats.

The 2.3 version of PHPUnit had a chapter on this, but it is gone for some time now. You might be able to find an old copy with Google somewhere.

Since you mention this is for phpUnderControl: if you are not fixed on that, consider using Jenkins and http://jenkins-php.org.

On a side note: unless we are talking CI servers, most people I know don't use PHPUnit through a web interface. They either just use the command line or their IDE integration.