php-code-coverage icon indicating copy to clipboard operation
php-code-coverage copied to clipboard

Code coverage report fails to generate

Open tombevers opened this issue 15 years ago • 2 comments

After running some test the code coverage report fails to generate (see errors). This only occurs with types coverage-clover and coverage-html. The junit type is generated correctly.

I'm using PHPUnit 3.6RC2 and PHP_CodeCoverage 1.1.0RC1.

Errors:

Writing code coverage data to XML file, this may take a moment.

PHP Warning: require(/usr/share/php/PHP/CodeCoverage/Report/Factory.php): failed to open stream: No such file or directory in /usr/share/php/PHP/CodeCoverage/Autoload.php on line 92 PHP Stack trace: PHP 1. {main}() /usr/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:124 PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:182 PHP 5. PHP_CodeCoverage_Report_Clover->process() /usr/share/php/PHPUnit/TextUI/TestRunner.php:302 PHP 6. PHP_CodeCoverage->getReport() /usr/share/php/PHP/CodeCoverage/Report/Clover.php:85 PHP 7. php_codecoverage_autoload() /usr/share/php/PHP/CodeCoverage/Autoload.php:0

Warning: require(/usr/share/php/PHP/CodeCoverage/Report/Factory.php): failed to open stream: No such file or directory in /usr/share/php/PHP/CodeCoverage/Autoload.php on line 92

Call Stack: 0.0002 638224 1. {main}() /usr/bin/phpunit:0 0.0041 1334648 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 0.0042 1335536 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:124 0.1630 18894616 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:182 0.6120 22479752 5. PHP_CodeCoverage_Report_Clover->process() /usr/share/php/PHPUnit/TextUI/TestRunner.php:302 0.6120 22481768 6. PHP_CodeCoverage->getReport() /usr/share/php/PHP/CodeCoverage/Report/Clover.php:85 0.6120 22482296 7. php_codecoverage_autoload() /usr/share/php/PHP/CodeCoverage/Autoload.php:0

PHP Fatal error: require(): Failed opening required '/usr/share/php/PHP/CodeCoverage/Report/Factory.php' (include_path='/var/www/printconcept.local/backend/application/../library:/var/www/printconcept.local/backend/library:.:/usr/share/php:/usr/share/pear') in /usr/share/php/PHP/CodeCoverage/Autoload.php on line 92 PHP Stack trace: PHP 1. {main}() /usr/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:124 PHP 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:182 PHP 5. PHP_CodeCoverage_Report_Clover->process() /usr/share/php/PHPUnit/TextUI/TestRunner.php:302 PHP 6. PHP_CodeCoverage->getReport() /usr/share/php/PHP/CodeCoverage/Report/Clover.php:85 PHP 7. php_codecoverage_autoload() /usr/share/php/PHP/CodeCoverage/Autoload.php:0

Fatal error: require(): Failed opening required '/usr/share/php/PHP/CodeCoverage/Report/Factory.php' (include_path='/var/www/printconcept.local/backend/application/../library:/var/www/printconcept.local/backend/library:.:/usr/share/php:/usr/share/pear') in /usr/share/php/PHP/CodeCoverage/Autoload.php on line 92

Call Stack: 0.0002 638224 1. {main}() /usr/bin/phpunit:0 0.0041 1334648 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46 0.0042 1335536 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:124 0.1630 18894616 4. PHPUnit_TextUI_TestRunner->doRun() /usr/share/php/PHPUnit/TextUI/Command.php:182 0.6120 22479752 5. PHP_CodeCoverage_Report_Clover->process() /usr/share/php/PHPUnit/TextUI/TestRunner.php:302 0.6120 22481768 6. PHP_CodeCoverage->getReport() /usr/share/php/PHP/CodeCoverage/Report/Clover.php:85 0.6120 22482296 7. php_codecoverage_autoload() /usr/share/php/PHP/CodeCoverage/Autoload.php:0

phpunit.xml:

<logging>
    <log type="coverage-html" target="./log/coverage" title="SomeTitle" charset="UTF-8" yui="true" highlight="true" lowUpperBound="35" highLowerBound="70" />
    <log type="coverage-clover" target="./log/clover.xml" />
    <log type="junit" target="./log/junit.xml" logIncompleteSkipped="false" />
</logging>

tombevers avatar Sep 07 '11 09:09 tombevers

Which version of PHPUnit and PHP_CodeCoverage are you using?

sebastianbergmann avatar Sep 07 '11 09:09 sebastianbergmann

Ha you're fast I just was updating the bug report.

I'm using PHPUnit 3.6RC2 and PHP_CodeCoverage 1.1.0RC1.

tombevers avatar Sep 07 '11 09:09 tombevers