PHP code coverage and Selenium

会有一股神秘感。 提交于 2019-12-23 19:13:16

问题


I came across this thread on SO which talks about PHP code coverage tools - Code Coverage tools for PHP

I have never worked on PHP and have been writing Selenium UI tests using java against an application which has been written in PHP. While going through the thread I mentioned above I felt (I might be wrong) that those PHP code coverage tools are to be used when there are unit tests written in PHP Unit and one wants to find how well Unit tests cover the application.

I am looking for a solution where I execute my Selenium tests which are written and java and there would be some hook in PHP application code base which gives some sort of report about application code base which was executed and one which was not.

Is it possible to do this?


回答1:


Just add an auto-prepend script which calls xdebug_start_code_coverage() and registers a shutdown function which logs the output of xdebug_get_code_coverage()

Then analyse your data later.



来源:https://stackoverflow.com/questions/8383016/php-code-coverage-and-selenium

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