Anyone know how to use the code coverage plugin for PHPUnit Follow Edgar Martinez Created September 10, 2011 07:39 Does anyone know how to use the code coverage plugin for PHPUnit inside PHPStorm 2.1.xI am having a really hard time understanding how to use it
Hmm, what happen when you select in this window your clover xml file (generated by phpunit)? You need generate it first using command line option --coverage-clover /tmp/coverage.xml or adding to your phpunit.xml new <log type="coverage-clover" target="/tmp/coverage.xml"/> directive to <logging> section.
Ok I will try that. Thank you, sorry for the late response was out all day. I will post back withthe results but I am sure you are correct.
OK I tried running the command you mentioned but no file is generated whe I run this command. Not sure what I am missing here.
OK that worked its just the PHPUnit command is cryptic
Thanks for support!
I'm confused. I thought PHPUnit logging was not supported.
So, he used the command line, because the other is not supported yet, correct?
I did it using phing. there is not real way to run phpUnit loggin in PHPStorm as far as I know. But I did find this one plugin for PHPStorm that shows code coverage directly int he editor when I run the phing script. I don not lnow how to integrate the PHPUnit.xml file into the run configuration so that when I run my test it also performs code coverage, that i have yet to figure out but this is a good start.
If anyone knows how to integrate the PHPUnit.cml file in PHPStorm please let me knowm because right now the phing inegration is a bit fo a hack.
yes I usewd the command line to generate the clover.xml file. You can also do this via Phing but it is not ideal.
Do you have xdebug installed?
Sadly phpunit doesn't fail if you try to generate coverage without xdebug loaded.