-
-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/branch coverage #400
Conversation
6bfe5a0
to
91387b8
Compare
Thank you, @Maks3w, for this contribution. It will take a while for me to review this as I am very busy at the moment. |
Yes, of course, I will look at #398 and #399 first. In the meantime it would help me (and others) if you could attach screenshots (maybe from the https://github.com/sebastianbergmann/money/ project) to this issue. Thanks! |
These commits show the differences in the output respect master. Maks3w@482cb3f Basically I've added the Path data close to the line statistics. Now I'm playing with executing this in a real library project and I try to make it work. Seems does not recognize the paths but I don't know yet why. |
Ah, okay. So for now it's "only" textual. Still a good starting point. Do you also want to implement something like http://derickrethans.nl/images/content/paths-covered-mockup.png? |
No sorry, too much. I'm trying to use this data for colorize paths in coveralls.io (using coverage 0/1 value instead hits per line) |
I've found a bug related to namespaces. I'll fix it later. |
Now works. @derickr Any chance for add a whitelist coverage feature to XDebug? I think will save lots of memory because it now tracks all the PHPUnit framework stuff. |
@Maks3w http://bugs.xdebug.org/view.php?id=1144 is about pushing the filtering from PHPUnit down to Xdebug. |
@sebastianbergmann Fixed |
About the HTML Mockup I suggest to do the same I expect to do with coveralls. Turn green or red each line if is covered by a branch or not. Some tests have too many paths > 4096 which is impossible to print. |
@sebastianbergmann I've restored the compatibility with Xdebug < 2.3.2. However I suggest force pathCoverage param from PHPUnit |
82a4f23
to
235c50c
Compare
Please rebase against current |
BTW: Thank you for your contributions. I am happy that somebody else works on this code :-) I would be even happier if you would configure your Git client to properly store your name and email with your commits (see https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md#workflow). Keep up the good work! |
235c50c
to
7bb2c4c
Compare
Rebased. I don't understand what do you refer with configure my author data on Git. All my commits have a name and email. |
Something is broken. Tests pass but resume is wrong. |
|
7bb2c4c
to
8f476ba
Compare
@sebastianbergmann Done. Was a problem while skipping path coverage if xdebug didn't support |
Re: #400 (comment) Sure, PHPUnit will need a new configuration option (off by default, IMHO) to control path coverage. |
No, Maks3w it's not my real name and my skin is not yellow :-) |
I've open sebastianbergmann/phpunit#1937 about path coverage switch on PHPUnit configuration |
Reopen as sebastianbergmann/phpunit#1938 |
6134834
to
e9437eb
Compare
|
I know. I just did the lowest effort so the library still functional. Do you think is needed to test both scenarios? (path on/off) |
Exclude the path information in the HTML output will require duplicate the templates or develop a conditional statement the template. Will also require duplicate all the test fixtures. I think 0/0 could be a valid value as has been always in the Clover report ( Probably the only thing we could do is paint the values (text and html outputs) with a disabled color (gray) |
Enable pathCoverage by default only when supported
e9437eb
to
267336f
Compare
I've rewritten the bc commit. Loops are enough safe for to not depend of the pathCoverage setting value. |
Tested with Xdebug 2.4.0beta1 |
How is this coming along? |
poke? |
Closing #400 and #425 because they have run out-of-sync with |
@sebastianbergmann I won't spent more time on this for nothing. This PR has been open for 4 months. If you won't merge it why open a new PR |
I did not merge it because there were "competing" / conflicting merge requests and I got confused. I hope that a new pull request will be less confusing. Sorry :-( |
Please don't give up on this! Having branch and path coverage would be extraordinarily helpful! |
This PR continue the work @sebastianbergmann made on
feature/path-coverage
branch.Includes PRs #398 and #399
Close #380
TODO:
cond
line types.