このガイドに従って、PHP プロジェクトを Jenkins と統合します。
ここに私のbuild.xml
ファイルがあります
これは、実行時の出力ant -f build.xml
からのものです。
phpunit:
[exec] PHPUnit 3.6.10 by Sebastian Bergmann.
[exec] Usage: phpunit [switches] UnitTest [UnitTest.php]
[exec] phpunit [switches] <directory>
[exec] --log-junit <file> Log test execution in JUnit XML format to file.
[exec] --log-tap <file> Log test execution in TAP format to file.
[exec] --log-json <file> Log test execution in JSON format.
[exec] --coverage-clover <file> Generate code coverage report in Clover XML format.
[exec] --coverage-html <dir> Generate code coverage report in HTML format.
[exec] --coverage-php <file> Serialize PHP_CodeCoverage object to file.
[exec] --coverage-text=<file> Generate code coverage report in text format.
[exec] Default to writing to the standard output
[exec] ...
.
行 132 付近の構成のスニペット:
<target name="phpunit" description="Run unit tests with PHPUnit">
<exec executable="phpunit" failonerror="true"/>
</target>
phpunit/PHPUnit がインストールされています。
pear list -c phpunit
Installed packages, channel pear.phpunit.de:
============================================
Package Version State
File_Iterator 1.3.1 stable
PHPUnit 3.6.10 stable
PHPUnit_MockObject 1.1.1 stable
PHP_CodeBrowser 1.0.2 stable
PHP_CodeCoverage 1.1.2 stable
PHP_Invoker 1.1.0 stable
PHP_Timer 1.0.2 stable
PHP_TokenStream 1.1.3 stable
Text_Template 1.1.1 stable
phpcpd 1.3.5 stable
phploc 1.6.4 stable
@oers に返信 Thu May 3 20:31:50 ICT 2012:
build.xml ファイルを次のように編集しました。
<target name="phpunit" description="Run unit tests with PHPUnit">
<exec executable="phpunit" failonerror="true"/>
<arg line="--log-junit ${basedir}/build/logs/phpunit.xml serving" />
</target>
しかし、何も変わりません。