[Webtest] Re: Interest in PHP Code Coverage with Canoo Webtest?

Ralf Müller webtest@lists.canoo.com
Tue, 16 May 2006 09:04:32 +0200

Troy, you are right. Xdebug seems to be the only way to gather the 
coverage report information. And it woorks quite well.

Take a look at
To find out how I've set up my Code Coverage Analysis for PHP.

I guess this text already contains enough information to set up your own 
environment, but feel free to contact me if you have any problems. I 
will also try to get into more details asap.


PS: yes, PHPunit has some kind of Code Coverage include, but I didn't 
manage to get it going. The aproach decribed in the wiki works great - 
even for you unit tests if you use an HTMLrunner.

Troy McGuire wrote:
> As far as I know, code coverage for PHP doesn't exist with WebTest, 
> however, you can get code coverage results using PHPUnit (actually I 
> think it won't be a feature until version 3).  Using it with Phing give=
> a nice HTML report from what I've seen.  I was unable to get viewable 
> results with PHPUnit2, but I could easily be doing something wrong.   S=
> far, all tools that offer code coverage for PHP use Xdebug, so you'll 
> need the libraries, etc associated with that.  Good Luck!
> -Troy
> troy@spawnordie.com
> Ralf Müller wrote:
>> Hi!
>> ...just wanted to ask if there is an interest on how to do Code 
>> Coverage (Line Coverage) Testing for PHP with Webtest?
>> If yes, I could compile some how-tos...
>> Cheers,
>> Ralf
>> PS: If you don't knwo what I mean by "Code Coverage": Imagine a tool 
>> which will show you your sourcecode with all lines of code highlighted=
>> which where _not_ executed during one of your tests...
>> _______________________________________________
>> WebTest mailing list
>> WebTest@lists.canoo.com
>> http://lists.canoo.com/mailman/listinfo/webtest