RE: [PHP-QA] Userland PHP Code Coverage with run-tests.php
| From: | Васил Рангелов | Date: | Sun, 05 Feb 2012 23:56:13 +0000 |
| Subject: | RE: [PHP-QA] Userland PHP Code Coverage with run-tests.php | ||
| References: | 1 2 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-66079@lists.php.net to get a copy of this message | ||
Hi Tyrael! I was actually referring to your help at #pear with the phrase "with some help"
;-)
I don't remember if I said it then, but the problem with using PHPUnit is that PHPUnit
can't run tests as CGI, and this is required for this particular package (APC doesn't even
pretend to work in CLI; returns false all the time; Wincache even crashes). And the problem with
PEAR/Pyrus' PHPT implementation is that misses --REDIRECTTEST--, which makes DRY-ing the tests
impossible.
From: Ferenc Kovacs [mailto:tyra3l@gmail.com]
Sent: Sunday, February 05, 2012 11:36 PM
To: Васил Рангелов
Cc: php-qa@lists.php.net; Daniel Convissor; php-pear-qa@lists.php.net
Subject: Re: [PHP-QA] Userland PHP Code Coverage with run-tests.php
2012/2/5 Васил Рангелов <boen.robot@gmail.com>
Hello QA team.
With some help, I recently made and successfully ran some phpt tests with
run-tests.php. The tests however are not for PHP, but for a PHP PEAR2-style
package.
I wanted to ask how do I go about generating a code coverage report though?
There doesn't seem to be a (documented?) switch about it like in PEAR, Pyrus
or PHPUnit.
If you want to take a look at the actual code, the package is currently
available at
https://github.com/boenrobot/Cache_SHM/
Regards,
Vasil Rangelov
--
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php
hi.
run-tests.php can't do coverage report.
for the coverage report of php-src we use gcov and some php scripts, you can see those at http://svn.php.net/viewvc/web/php-gcov/trunk/
for a PEAR2 package, I would suggest using phpunit unit tests, AFAIK that is the preferred way.
ps: I'm cc'ing the pear-qa mailing list and Daniel Convissor, as he is the current QA
guru of the PEAR project.
--
Ferenc Kovács
@Tyr43l - http://tyrael.hu