Created attachment 162909 [details]
code coverage report in Clover XML
INFO [org.netbeans.modules.php.phpunit.coverage.CoverageProvider]: File /tmp/nb-phpunit-coverage.xml not found. If there are no errors in PHPUnit output (verify in Output window), please report an issue (http://www.netbeans.org/issues/).
but file exists:
ls -la /tmp/nb-phpunit-coverage.xml
-rw-r--r-- 1 vitex vitex 5868 lis 14 15:34 /tmp/nb-phpunit-coverage.xml
Generated command is OK:
"/usr/bin/php" "/home/vitex/Projects/AdminIT/FlexiCenik/vendor/bin/phpunit" "--colors" "--log-json" "/tmp/nb-phpunit-log.json" "--bootstrap" "/home/vitex/Projects/AdminIT/FlexiCenik/testing/bootstrap.php" "--configuration" "/home/vitex/Projects/AdminIT/FlexiCenik/testing/configuration.xml" "--coverage-clover" "/tmp/nb-phpunit-coverage.xml" "/usr/local/netbeans-8.2/php/phpunit/NetBeansSuite.php" "--" "--run=/home/vitex/Projects/AdminIT/FlexiCenik/testing/src/FlexiCenik/FlexiCenikTest.php"
PHPUnit 5.5.7 by Sebastian Bergmann and contributors.
Runtime: PHP 5.6.27-0+deb8u1 with Xdebug 2.2.5
..IIIIIIIIIIIIII....IIIIIIIIIIIIII......II.I..................... 65 / 79 ( 82%)
.............. 79 / 79 (100%)
Time: 351 ms, Memory: 9.75MB
There were 31 incomplete tests:
This test has not been implemented yet.
OK, but incomplete, skipped, or risky tests!
Tests: 79, Assertions: 64, Incomplete: 31.
Generating code coverage report in Clover XML format ... done
It works fine with PHPUnit 4.x but fails with PHPUnit 5.x. Thanks for catching that, I will try to fix it.
Thanks for reporting.
Aha, in my case, the PHPUnit 5.x says:
Error: No whitelist configured, no code coverage will be generated
Will investigate it.
So, PHPUnit 5.x requires whitelisting for code coverage . I will add a CLI parameter for it (I tested it with older versions of PHPUnit 4.7 and 3.7 and it should not break anything).
(In reply to Tomas Mysik from comment #3)
> I tested it with older versions of PHPUnit 4.7 and 3.7 and it should not break anything.
My bad, older versions complain about this parameter so it cannot be easily added.
Lowering to P3 because it seems to me that the only thing NetBeans can do is to inform user that the coverage log was not found (user needs to set whitelist in her XML configuration).
However, it does not seem to fix your original report - you apparently have whitelist defined in your XML configuration, right? However, I cannot reproduce it; could you please try to create a sample project and attach it here?
Info message added. As I wrote, this will not help in your case but since I cannot reproduce it, I cannot do much, sorry :/
I just verified that the message appears.
Integrated into 'main-silver', will be available in build *201611160001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Mysik <firstname.lastname@example.org>
Log: #268976 - Code coverage collection does not work
Transplanted to the releases repo branch release82: