Jenkins version - 2.22
Phing version - 0.13.3
PHPUnit version - 5.7.19
phpunit.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>
build.xml
...
<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>
...
When I run the phing
target in Jenkins
, I get following error.
unrecognized option -- b
What am I doing wrong? or any help how to debug this issue ?
Note - This is laravel-5.4
application and when I run phpunit
from application's root folder its working.
unrecognized option -- b
obviously originates from PHPUnit. Maybe the Phing task uses it the wrong way? – Joeb
, it may helpful to find the issue – Saumini Navaratnamphing -verbose
or evenphing -debug
might reveal the optionsphing
actually uses to startphpunit
. Maybe you'll find yourb
there. – Joe