Jenkins 使用Phing运行phpunit测试时出错
詹金斯版本-2.22 Phing版本-0.13.3 PHPUnit版本-5.7.19 phpunit.xmlJenkins 使用Phing运行phpunit测试时出错,jenkins,phpunit,phing,Jenkins,Phpunit,Phing,詹金斯版本-2.22 Phing版本-0.13.3 PHPUnit版本-5.7.19 phpunit.xml <?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="bootstrap/autoload.php" colors="true"
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app/Managers</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>
...
<coverage-setup database="./report/coverage/database">
<fileset id="coverageFileSet" dir="./app/Managers">
<include name="**/*Manager*.php" />
</fileset>
</coverage-setup>
<phpunit pharlocation="./vendor/phpunit/phpunit/phpunit" configuration="./phpunit.xml" printsummary="true" haltonerror="true" haltonfailure="true" codecoverage="true">
<formatter type="clover" outfile="report/coverage/clover.xml"/>
</phpunit>
<coverage-report outfile="report/coverage/coverage.xml">
<report todir="report/coverage"/>
</coverage-report>
...
/测试
/应用程序/经理
build.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app/Managers</directory>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>
...
<coverage-setup database="./report/coverage/database">
<fileset id="coverageFileSet" dir="./app/Managers">
<include name="**/*Manager*.php" />
</fileset>
</coverage-setup>
<phpunit pharlocation="./vendor/phpunit/phpunit/phpunit" configuration="./phpunit.xml" printsummary="true" haltonerror="true" haltonfailure="true" codecoverage="true">
<formatter type="clover" outfile="report/coverage/clover.xml"/>
</phpunit>
<coverage-report outfile="report/coverage/coverage.xml">
<report todir="report/coverage"/>
</coverage-report>
...
。。。
...
在Jenkins
中运行phing
目标时,出现以下错误。
无法识别的选项--b
我做错了什么?或者如何调试此问题的任何帮助
注意-这是
laravel-5.4
应用程序,当我从应用程序的根文件夹运行phpunit
时,它正在工作。您说您使用的是Phing版本-0.13.3,这不太合理。您应该尝试使用Phing 3.0.0-alpha3,它有很多改进
另外,我认为以下答案可以帮助您:消息
未识别选项--b
。也许Phing任务用错了方法?@Joe是的,但我想知道我是否做错了?不管怎样,我都可以找到选项b
,找到类似的问题可能会有帮助。根据研究,它可能与旧版本的PHPUnit(<4.8)一起工作。运行phing-verbose
甚至phing-debug
可能会显示phing
实际用于启动PHPUnit
的选项。也许你会在那里找到你的b
。