这是我的配置。 Jenkins无法构建,因为它无法看到该文件。我的本地Ubuntu 14.04 VM没有创建它,而jenkins AWS 14.04实例正在使jenkins构建失败。 Xdebug和tokenizer已启用。
<?xml version="1.0" encoding="UTF-8"?>
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html -->
<phpunit
backupGlobals = "false"
backupStaticAttributes = "false"
colors = "true"
convertErrorsToExceptions = "true"
convertNoticesToExceptions = "true"
convertWarningsToExceptions = "true"
processIsolation = "false"
stopOnFailure = "false"
syntaxCheck = "false"
bootstrap = "../app/bootstrap.php.cache" >
<testsuites>
<testsuite name="Project Test Suite">
<directory>../src/*/*Bundle/Tests</directory>
<directory>../src/*/Bundle/*Bundle/Tests</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="../build/coverage"/>
<log type="coverage-clover" target="../build/logs/clover.xml"/>
<log type="coverage-crap4j" target="../build/logs/crap4j.xml"/>
<log type="junit" target="../build/logs/junit.xml" logIncompleteSkipped="false"/>
</logging>
<!--
<php>
<server name="KERNEL_DIR" value="/path/to/your/app/" />
</php>
-->
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory>../src</directory>
<exclude>
<directory>../src/*/*Bundle/Resources</directory>
<directory>../src/*/*Bundle/Tests</directory>
<directory>../src/*/Bundle/*Bundle/Resources</directory>
<directory>../src/*/Bundle/*Bundle/Tests</directory>
</exclude>
</whitelist>
</filter>
<groups>
<exclude>
<group>Acceptance</group>
</exclude>
</groups>
<listeners>
<listener class="\Mockery\Adapter\Phpunit\TestListener"></listener>
</listeners>
</phpunit>
答案 0 :(得分:1)
您的PHPUnit版本是什么?
PHPUnit 4.0.0中引入了--coverage-crap4j
选项。
https://github.com/sebastianbergmann/phpunit/wiki/ChangeLog-for-PHPUnit-4.0#phpunit-400