问题
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