I'm using Jenkins with Ant plug-in to run PHPUnit/Selenium tests. I'm trying to set up several Jenkins jobs (I've only had one job previously). Tests for these jobs are in the same GitHub repo, but different folders. So, I could create different Ant targets in my build.xml, but do I need separate phpunit.xml files for each job (and if so, how do I specify file names in Ant build script?) Or is there a way to make Ant distinguish between tests in the same phpunit.xml file? Any other good way to go about this? Any examples would be appreciated.
Ant build file:
<?xml version="1.0" encoding="UTF-8"?>
<project name="MyProject" default="build">
<target name="build" depends="clean,prepare,phpunit"/>
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build"/>
</target>
<target name="prepare" description="Make log and coverage directories">
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/coverage_selenium"/>
</target>
<target name="phpunit" description="MyTests">
<exec dir="${basedir}" executable="phpunit" failonerror="true"/>
</target>
</project>
phpunit.xml:
<phpunit>
<testsuites>
<testsuite name="MyTests">
<file>path/to/test.php</file>
</testsuite>
</testsuites>
</phpunit>
Thanks!