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
http://webtest-community.canoo.com/wiki/space/PHP+Code+Coverage+Testing
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.

Cheers,
Ralf

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 gives 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. So far, all tools that offer code coverage for PHP use Xdebug, so you'll need the libraries, etc associated with that. Good Luck!

-Troy
[EMAIL PROTECTED]

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
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest




_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to