PHP doc article about writing tests 1 mentions gcov.php.net as the
source to see the coverage, but this address is not available anymore.
I believe this should be updated to show how the coverage can be found
so people know where to focus their efforts if they want to contribute
with tests.
Hey there,
PHP doc article about writing tests [1] mentions gcov.php.net as the
source to see the coverage, but this address is not available anymore.
The code coverage report can be found at
https://app.codecov.io/github/php/php-src
I believe this should be updated to show how the coverage can be found
so people know where to focus their efforts if they want to contribute
with tests
I will have a look, the page overall looks like it could need some love ;-)
In the meantime if you are interested in writing tests, I once wrote a blog
post about that topic at
https://dev.to/realflowcontrol/growing-the-php-core-one-test-at-a-time-4g4k
/Florian
The code coverage report can be found at https://app.codecov.io/github/php/php-src
Ah, perfect. Thank you for sharing. I will take a closer look after
work, but something seems weird to me. Here1 you see that
ctype_alpha seems to be uncovered, but here2 we can see that it's
tested.
I will have a look, the page overall looks like it could need some love ;-)
In the meantime if you are interested in writing tests, I once wrote a blog post about that topic at https://dev.to/realflowcontrol/growing-the-php-core-one-test-at-a-time-4g4k
Ah, that's great. Thank you for that! :-D
Hi
The code coverage report can be found at https://app.codecov.io/github/php/php-src
Ah, perfect. Thank you for sharing. I will take a closer look after
work, but something seems weird to me. Here1 you see that
ctype_alpha seems to be uncovered, but here2 we can see that it's
tested.
You'll see this kind of stuff with macros.
The coverage report shows "partially covered" code as uncovered due to a limitation.
In this particular example, the parameter parsing code failure isn't tested, so it marks the whole macro as untested.
You'll see this many times in the PHP codebase.
Also for example for RETURN_THROWS: because that macro performs an assertion it's always in red because the assertion isn't hit in our testing (and that's a good thing because if it were hit then it means there's a bug).
Kind regards
Niels
I will have a look, the page overall looks like it could need some love ;-)
In the meantime if you are interested in writing tests, I once wrote a blog post about that topic at https://dev.to/realflowcontrol/growing-the-php-core-one-test-at-a-time-4g4k
Ah, that's great. Thank you for that! :-D