Symfony2& PHPUnit代码覆盖率

时间:2015-02-12 14:02:37

标签: unit-testing symfony phpunit

我目前正在使用此xml配置测试我的Symfony2项目,该工作正常:

<?xml version="1.0" encoding="UTF-8"?>

<phpunit
    backupGlobals               = "false"
    backupStaticAttributes      = "false"
    colors                      = "true"
    convertErrorsToExceptions   = "true"
    convertNoticesToExceptions  = "true"
    convertWarningsToExceptions = "true"
    processIsolation            = "false"
    stopOnFailure               = "false"
    syntaxCheck                 = "false"
    bootstrap                   = "bootstrap.php.cache" >

    <filter>
        <whitelist>
            <directory>../src/IRC/*Bundle/</directory>
            <exclude>
                <directory>../src/*/*Bundle/Resources</directory>
                <directory>../src/*/*Bundle/Tests</directory>
            </exclude>
        </whitelist>
    </filter>

    <testsuites>
        <testsuite name="Project Test Suite">
            <directory>../src/*/*Bundle/Tests</directory>
        </testsuite>
    </testsuites>

</phpunit>

我希望同时生成代码覆盖率报告,因此我将其添加到配置中:

<logging>
    <log type="coverage-html" target="/var/www/manager/dev/code_coverage/"/>
</logging>

当我尝试运行测试时,PHPUnit永远不会启动,我甚至不会收到Configuration read from /foo/bar/symfony/app/phpunit.xml.dist消息。我试着让它整夜运行,它从未开始。我做错了什么?

0 个答案:

没有答案