This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I want to see the code coverage of my unit tests, performed with PHPUnit, but the code coverage report is always empty / 0,0%: "No data -- have you run your code yet?" Searching around, I found this old blog entry: https://jdhnet.wordpress.com/2013/12/10/empty-code-coverage-report-after-running-unit-tests-in-netbeans/ The code coverage report works only, if NetBeans and the project are on the same harddrive! My normal environment is NetBeans on C: and the projects, xampp with phpunit on E:. With the project on E: the code coverage report left empty. If I copy the project to C: and execute the test, the code coverage report works as expected.
Please, reproduce your problem, copy the command from the Output window and run it manually. Then reopen this issue and atach both PHPUnit log files ("--log-junit" and "--coverage-clover"). Thanks.
BTW both files [1][2] should be found in your TEMP directory once you reproduce your problem. Thanks. [1] nb-phpunit-log.xml [2] nb-phpunit-coverage.xml
@vriha: Please try to reproduce this issue and attach PHPUnit log files (see my previous comments). Thanks.
Created attachment 153417 [details] nb-phpunit-coverage.xml
Created attachment 153418 [details] nb-phpunit-log.xml
Hi Tomas, I attached the files. Here is also the content from the output window: "E:\xampp\bin-phar\phpunit.cmd" "--colors" "--log-junit" "C:\Users\Mike\AppData\Local\Temp\nb-phpunit-log.xml" "--coverage-clover" "C:\Users\Mike\AppData\Local\Temp\nb-phpunit-coverage.xml" "C:\Users\Mike\AppData\Roaming\NetBeans\8.0\phpunit\NetBeansSuite.php" "--run=E:\dev\SoftConnect\trunk\Tests\Xantiva" E:\dev\SoftConnect\trunk\Tests>php "E:\xampp\bin-phar\phpunit.phar" --colors --log-junit C:\Users\Mike\AppData\Local\Temp\nb-phpunit-log.xml --coverage-clover C:\Users\Mike\AppData\Local\Temp\nb-phpunit-coverage.xml C:\Users\Mike\AppData\Roaming\NetBeans\8.0\phpunit\NetBeansSuite.php --run=E:\dev\SoftConnect\trunk\Tests\Xantiva PHPUnit 4.5.0 by Sebastian Bergmann and contributors. Configuration read from E:\dev\SoftConnect\trunk\Tests\phpunit.xml ....................................................... Time: 9.21 seconds, Memory: 12.00Mb OK (55 tests, 101 assertions) Generating code coverage report in Clover XML format ... done Done. Best regards, Mike
I can reproduce it as well, code coverage xml looks identical in my case to the one from @xantiva, test results are displayed OK in NetBeans Product Version: NetBeans IDE Dev (Build 201504280001) Java: 1.8.0_11; Java HotSpot(TM) 64-Bit Server VM 25.11-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_11-b12 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
For the record I used latest PHPUnit from https://phar.phpunit.de/phpunit.phar https://phar.phpunit.de/phpunit-skelgen.phar
So, from the attached files it is clear that the problem is in PHPUnit - its coverage log file contains no data [1]; compare it to the other log file where all the data with results are available. You will likely need to report a bug directly against PHPUnit. Thanks for reporting. [1] <metrics files="0" loc="0" ncloc="0" classes="0" methods="0" coveredmethods="0" conditionals="0" coveredconditionals="0" statements="0" coveredstatements="0" elements="0" coveredelements="0"/>
Thanks for your work. I added an issue at PHPUnit (Github): https://github.com/sebastianbergmann/phpunit/issues/1698
(In reply to xantiva from comment #10) > Thanks for your work. I added an issue at PHPUnit (Github): > > https://github.com/sebastianbergmann/phpunit/issues/1698 Thanks a lot!