phpunit代码覆盖率未生成

时间:2015-05-08 12:24:10

标签: zend-framework phpunit

我通过命令行调用phpunit.phpunit运行成功,但没有生成代码覆盖,但显示的仪表板没有任何代码覆盖。

我的配置是

PHP_CodeCoverage 1.2.18 
PHP 5.5.19 and 
PHPUnit 3.7.21 

和xampp Xdebug设置为

zend_extension = "C:\xampp\php\ext\php_xdebug-2.3.2-5.5-vc11.dll"
xdebug.profiler_append = 1
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"

phpunit.xml设置是

<phpunit
    backupGlobals="false"
    backupStaticAttributes="false"
    colors="true"
    convertErrorsToExceptions="true"
    convertNoticesToExceptions="true"
    convertWarningsToExceptions="true"
    processIsolation="false"
    stopOnFailure="false"
    syntaxCheck="false"
    bootstrap="./application/bootstrap.php"  >
    <testsuites>
        <testsuite name="MyApp">
            <!--<file>./application/models/UserTest.php</file>-->
            <!-- <directory>./</directory> -->
            <!--<file>./application/modules/user/controllers/UserControllerTest.php</file>-->
            <directory>./application/modules</directory>

        </testsuite>
    </testsuites>
 <filter>
        <whitelist addUncoveredFilesFromWhitelist='false'>
            <directory suffix=".php">../application/</directory>
            <exclude>
                <file>../application/Bootstrap.php</file>
                <file>../application/controllers/ErrorController.php</file>
                <file>../application/configs/defined.php</file>
                <directory suffix=".phtml">../application/</directory>
                <directory>../application/configs/clients/5012/</directory>
                <directory>../application/configs/clients/your_port/</directory>
            </exclude>
        </whitelist>
    </filter>


    <logging>

       <log type="coverage-html" target="./log/htmlreport" lowUpperBound="35"
       highLowerBound="70"/>
       <log type="json" target="./log/jsonreport.json" charset="UTF-8"/>

    </logging>
    <php>
        <init name="memory_limit" value="-1"/>
    </php>
</phpunit>

什么都不见了?我在哪里错了?

0 个答案:

没有答案