-
Notifications
You must be signed in to change notification settings - Fork 122
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
Missing code coverage schema prevents results being displayed. #367
Comments
I'm not sure I understand your problem: How would a 404 with regards to something in PHPUnit should affect phpDox? I'm not aware of any code in phpDox that would verify the coverage report based on its schema. |
My apologise, let me re-phrase. Because the schema is not available, phpdox cannot process the phpunit code coverage xml file. The error message reported in #333 is returned. Is there any way the schema can be ignored if it simply can't be found ? Thanks for your time. |
Okay, getting clearer but still confused ;) Let me try to add a short explanation to XML and namespaces, maybe afterwards you understand my confusion: An XML namespace is merely a string in form of an URI. Technically, "foo:bar" is a valid URI as the regex basically only requires a Those URLs can of course resolve to an actual website - most common would actually be some sort of human readable documentation - but it neither has to resolve at all nor does it have to provide anything that can be used for (automated) processing - like an XSD or DTD - there. That being said, phpDox merely looks at the namespace identifier to determine whether or not the file found can be a coverage file. It doesn't validate the actual document structure or anything. It doesn't care (or, technically speaking, know) the identifier is an URL and thus never even tries to access it. Of course that doesn't fix your problem of not having coverage information rendered. Can you provide me with some more details as to what is actually happing, how you generated the coverage, the relevant config xml fragments? |
I'm using CodeCeption to generate the xml file for phpdox :
From phpdox.xml :
I'm using the phpdox.xml file generated by :
I have phploc, phpcs, phpmd and Git enrichers all working with phpdox, so only the phpUnit information isn't showing. When I run phpdox, for the generation process I get :
phpdox version : |
Ah, now we're talking :) I'm not using code ception and thus can only guess what the invocation you showed does. I have no idea what type of coverage codeception creates when If the Can you verify that? What version of PHPUnit are you using? |
I'm using : From the Codeception manual : --phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml") However I've just noticed : I'm going to see what that produces and see if that's what I should be using. |
Using the --coverage-phpunit flag, phpdox seems to be happy processing the XML files produced. However, while I now have Coverage sections showing up on the individual classes, they are showing no code coverage on classes I know have code coverage. This is definite progress though.
It seems my initial issue raised is not the actual problem, so I understand if this ticket is closed. |
That sounds like a path mapping problem.
I was under the assumption that i fixed all of them ;-)
I'll check back when I'm at a computer.
Am Donnerstag, 25. Juli 2019 schrieb cmkhpacknet:
… I'm using :
Codeception PHP Testing Framework v3.0.3
Powered by PHPUnit 8.2.5 by Sebastian Bergmann and contributors.
From the Codeception manual :
https://codeception.com/docs/reference/Commands
--phpunit-xml Generate PhpUnit XML Log (default: "phpunit-report.xml")
This is the one I'm using.
However I've just noticed :
--coverage-phpunit Generate CodeCoverage PHPUnit report in file (default: "coverage-phpunit")
I'm going to see what that produces and see if that's what I should be using.
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#367 (comment)
--
Gesendet von meinem Sailfish-Gerät.
|
I have tried using PHPUnit (6.5.14) instead of CodeCeption and that has solved this issue. The XML produced is correctly read by phpdox and I'm seeing the code coverage results show in the class and source code pages. |
Given you previously used PHPUnit 8 via CodeCeption, it would be rather interesting to see if things work as you want when you use PHPUnit 8 rather than only the old 6.5.14. |
Considering this case closed :) |
Thanks for your help on this. Much appreciated. :) |
The schema which should be available at:
http://schema.phpunit.de/coverage/1.0
or
https://schema.phpunit.de/coverage/1.0
is currently returning a 404 message.
While I understand this is a missing file issue and not a bug as such, would it be possible to include a fixed version of this in phpdox to prevent this in future.
The text was updated successfully, but these errors were encountered: