Code Coverage tools for PHP [closed]

匿名 (未验证) 提交于 2019-12-03 03:06:01

问题:

Is there any code coverage tool available for PHP? I wish to check the code coverage of my code and API's written in PHP, but have not been able to lay my hands on any code coverage tool for PHP, as it is more of a server side language and dynamic in nature.

Does anyone know of a method by which code coverage for PHP can be executed?

回答1:

xdebug has Code Coverage Analysis.

Check this chapter of the PHPUnit Manual



回答2:

See our PHP Test Coverage tool from Semantic Designs:

http://www.semanticdesigns.com/Products/TestCoverage/PHPTestCoverage.html

Very low overhead, handles huge systems of files, intuitive GUI showing coverage on specific files, and generated report with coverage breakdown at method, class and package levels.

Best of all, no requirement to install anything in the system being tested. No need for xdebug, etc., which means you don't have to argue with the sysadmin to do your testing.

You can use it with PHPUnit to get unit-test driven coverage. Or you can use it on your website to collect coverage from any functional testing approach/tools you may have.



回答3:

Using Xdebug in combination with PHPUnit can give you code coverage analysis.



回答4:

Spike PHPCoverage. Both SimpleTest and PHPUnit can easily be integrated with it, although PHPUnits support is there out-of-the-box.



回答5:

Zend Studio ships with code coverage tools out the box.



回答6:

Xdebug can do code coverage reporting, and Phing, a build utility, can automate running coverage reports (http://devzone.zend.com/article/2955).



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!