Jenkins-Phing-PHPUnit formatter not working
Replaced your selenium target with a little customized phpunit target which works for me on Linux (CentOS/Debian) for PHP 5.5, 5.6 and 7.0.
<?xml version="1.0" encoding="UTF-8" ?><project name="Webshop" default="phpunit"> <property name="myproject.lib.dir" value="${project.basedir}/vendor" /> <property name="selenium.logs.dir" value="${project.basedir}/build/logs" /> <property name="selenium.logs.file" value="junit-selenium.xml" /> <property name="selenium.tests.dir" value="${project.basedir}/tests" /> <target name="prepare" depends="clean"> <mkdir dir="${selenium.logs.dir}"/> </target> <target name="clean"> <delete dir="${selenium.logs.dir}"/> </target> <target name="selenium" description="Run all selenium tests of Webshop" depends="prepare"> <!-- Please change pharlocation. Vendor/bin/phpunit shouldn't be used with phing. --> <phpunit bootstrap="${myproject.lib.dir}/autoload.php" pharlocation="${myproject.lib.dir}/bin/phpunit"> <formatter type="xml" todir="${selenium.logs.dir}" /> <batchtest> <fileset dir="${selenium.tests.dir}"/> </batchtest> </phpunit> </target> <fileset id="phptests" dir="${selenium.tests.dir}"/> <target name="phpunit" description="Run unit tests" depends="prepare"> <coverage-setup database="${selenium.logs.dir}/coverage.db"> <fileset refid="phptests"/> </coverage-setup> <phpunit haltonfailure="true" haltonerror="true" printsummary="true" bootstrap="${myproject.lib.dir}/autoload.php" codecoverage="true"> <formatter todir="${selenium.logs.dir}" type="clover" outfile="clover.xml" /> <formatter todir="${selenium.logs.dir}" type="xml" outfile="junit.xml" /> <batchtest> <fileset refid="phptests"/> </batchtest> </phpunit> </target></project>
Your build.xml for phing looks ok at first sight, but for some reason you seem to miss the usefile="true"
argument in your formatter
block.
<formatter type="xml" usefile="true" todir="${selenium.logs.dir}" outfile="${selenium.logs.file}"></formatter>
Try this out to see how it works for you.