I currently released a new version of phpUnderControl. Beside some minor fixes this release comes with a new feature to aggregate test results of multiple PHPUnit runs.
Use the new cli command merge-phpunit of phpUnderControl to merge multiple log files produced with PHPUnit, as shown in the following example build file for ant.
<?xml version="1.0" encoding="UTF-8"?>
<project name="phpuc-test" default="build" basedir=".">
<target name="build" depends="clean,p5.3.0,p5.2.5,p5.2.6,merge"/>
<target name="clean">
<delete>
<fileset dir="${basedir}/build/tmp">
<include name="*.xml"/>
</fileset>
</delete>
</target>
<target name="p5.2.5">
<exec executable="/usr/local/bin/php525" dir="${basedir}" failonerror="false">
<arg line="/usr/local/pear/bin/phpunit
--configuration ${basedir}/phpunit.xml
--log-xml ${basedir}/build/tmp/php-5.2.5.xml
PhpUnderControl_Example_MathTest source/tests/MathTest.php"/>
</exec>
</target>
<target name="p5.2.6">
<exec executable="/usr/local/bin/php526" dir="${basedir}" failonerror="false">
<arg line="/usr/local/pear/bin/phpunit
--configuration ${basedir}/phpunit.xml
--log-xml ${basedir}/build/tmp/php-5.2.6.xml
PhpUnderControl_Example_MathTest source/tests/MathTest.php"/>
</exec>
</target>
<target name="p5.3.0">
<exec executable="/usr/local/php/bin/php" dir="${basedir}" failonerror="false">
<arg line="/usr/local/pear/bin/phpunit
--configuration ${basedir}/phpunit.xml
--log-xml ${basedir}/build/tmp/php-5.3.0.xml
PhpUnderControl_Example_MathTest source/tests/MathTest.php"/>
</exec>
</target>
<target name="merge">
<exec executable="/home/manu/Desktop/Projects/workspace.xplib.de/phpUnderControl/trunk/bin/phpuc.php" dir="${basedir}" failonerror="false">
<arg line="merge-phpunit
-b php-5.3.0,php-5.2.6,php-5.2.5
-i ${basedir}/build/tmp/php-5.3.0.xml,${basedir}/build/tmp/php-5.2.6.xml,${basedir}/build/tmp/php-5.2.5.xml
-o ${basedir}/build/logs/log.xml"/>
</exec>
</target>
</project>
The following picture shows the
phpUnderControl result of such a merged log file:
There was a documentation error in the previously presented ant build file for the new merge-phpunit command of phpUnderControl. The @failonerror-attribute of the <exec />-tag in the merge target was set to false, which results in not failed Cru
Tracked: Sep 20, 14:45