New Code Coverage Tool EAP PS-114.1158
So I am think I configured the code coverage tool properly. My tests are run with the new code coverage button in EAP PS-114.1158 but the report says no lines ar covered event though the tests are run and they pass
I dont have PHPUnit outputting a clover file, Should I have it output a file whent he tests are run?
In other words do i still need to have PHPUnit write a clover report whent he tests are run?
Not sure why it says uncovered? even though it clearly is covered and passes the tests.
I'm on windows 7, using PHPStorm EAP PS-114.1158
请先登录再写评论。
The coverage report (xml file) is not properly generated on Windows (wrong paths to the files).
http://youtrack.jetbrains.com/issue/WI-9418
If you generate coverage xml file using phpunit console command and then tell PhpStorm to use that report (Ctrl+Alt+F6) you will see proper results.
P.S.
Interesting build number ... you are way ahead of all of us :)
OOPs fixed the build number :) LOL
I should have thanked you in the original POST Andriy, cuz I knew you would be the one with the answer. If you had a nickle for every post you have answerd, you would have a lot of nickles.
Anyways I will post back if that works. Thanks (thumbs up)
Maybe I am misunderstanding. This is a bug and it doiesnt work on windows I have to wait till it is fixed currently there is no way of bypassing the bug. Correct?
LOL OK I got it to work. Man this thing is cryptic but it is pretty sweet thanks for the response. But yeah I hope this smooth this out, (I know this is the EAP so its cool) super excited to sue this though
Cool!
I'm just going to use the PHPUnit code ceverage plguin from the repository for now on Windows, thats working pretty good.
Andriy,
It is not about this case - Edgar uses Zend Debugger (Zend Debuggger and Xdebug code coverage implemented in different way)
Thank you for feedback!
Hello Edgar,
Do you still have the issue?
Thank you for feedback!
Yup still have the issue Ill post a video in about a few hours to show the issue.
Edgar,
Please provide a screenshot of your PHP interpeter configuration ('Project Settings' -> 'PHP'), command line which PhpStorm generates for running tests with coverage and your phpinfo output (you can get it from 'Project Settings -> PHP' also).
Thank you for feedback!
1) When you run tests with "Coverage" button, PhpStorm will use it's own clover.xml file, so your one should be ignored (at least this is how it works for me here) -- can you look what the command is get's executed (command line) and post it here?
2) That PhpStorm's own clover.xml should be named like PROJECTNAME$RUNNAME.xml (in your case I think it will be Lestat$All.xml and should be located in C:\Users\USERNAME\.WebIde40\system\coverage. Can you show the content of it?
I don't know what exactly does not work for you (since you are using Zend Debugger while I have Xdebug), but I do not even see that dialog poping up asking what to do with new coverage data (merge, ignore, replace).
And yes -- I also think that the coverage data is cached.
OK here is the clover file, thanks for the help Andriy
Attachment(s):
Lestat$All.xml
OK here are all those files. Thank you for your help
Attachment(s):
settings-output-screenshot.zip
Well ... the file you provided clearly shows that you have no lines covered (for whatever reason) for your files (count="0" all the time):
TBH, this xml file is one big mess (compared to what I have here, of course). It contains references to tests files themselves plus PHPUnit own files. It should not contain those files -- they supposed to be automatically blacklisted and removed from the report.
I suggest Ctrl+Alt+F6 and use "delete/minus" button to remove old data and then try again -- maybe it merges all previous runs together or whatever.
I have found the reason and workaround for my own issue (why it does not work for me) -- hopefully there is something simple in your case as well.
Edgar,
Finally I have reproduced the issue. You need to enable 'zend_debugger.enable_coverage' option in your configuration file (Should be here: 'C:\zend\ZendServer\etc\cfg\debugger.ini').
Please let me know if it will help you or not.
Thank you for feedback!
OK cool i will give that a whirl and see what happens. Might be a day or two before I can respond with a confirmation I just got a new computer and I have to reinstall Pear and PHPUnit and we all know how much fuin that cna be on a PC . :_|
Anyways thank I will give this a try since I was one of the people that voted for this feature and it would be a reall usefull adition to all the tools PHPStorm already prvides.
I have to hand it to you that fixed the issue. Just need to enable the code_coverage in the debugger.ini file. Thanks very much that absolutely fixed it for me.
Only thing I would add is the same thing that Andriy Bazanov said and that is add some way to remove the Tests folder from code coverage.
Edgar,
Could you please submit an usability problem (it is actual for Zend Debugger only) http://youtrack.jetbrains.com/issues/WI#newissue=yes?
Thank you for feedback!