I need to create some code coverage statistics for a web app. We do not want to use unit testing to gather these stats. We would like to run something similar to site profiling and have a user go through the application. This way we can find code untouched and possibly never used. I’ve been trying to come up with a solution with Xdebug to try and come up with a persistent code coverage tool. The profiling tool in Xdebug doesn’t seem to record coverage. Of course I could not be using it right too. Anyone have anything… suggestions. I’m running short on time. I appreciate anything you guys have.
Is Xdebug: Code Coverage what you’re looking for?
Yes and no It produces the statistics I need, but as far I can tell it’s designed to work with unit testing, where I need something where I can initiate it and have it remain persistent recording stats as a user traverses through an app. Hope that makes sense. If there’s a way to do this with xDebug Code Coverage I’m not aware of it… not out of the norm.
Would you be able to dump the data it provides into a database for the user’s session on the site and then pull it all together to analyse? Shouldn’t be too much effort!
I was thinking similar in the sense of dumping everything to an XML, but the problem then is instrumenting all the code with the start, stop, dump, etc. Trying to find a way to get this without altering every file. If I can somehow wrap everything or something along those lines.
It works fine with included files so there should be a way to do this