|
|
|
|
@@ -6,6 +6,12 @@
|
|
|
|
|
Cactus project.
|
|
|
|
|
=============================================================================
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
Note: There is significant refactoring required for the goals cactus:test,
|
|
|
|
|
cactus:single, and cactus:match. The <cactus> tasks in each of those goals
|
|
|
|
|
are mostly similar.
|
|
|
|
|
-->
|
|
|
|
|
<project
|
|
|
|
|
xmlns:j="jelly:core"
|
|
|
|
|
xmlns:doc="doc"
|
|
|
|
|
@@ -348,22 +354,26 @@
|
|
|
|
|
|
|
|
|
|
</goal>
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
========================================================================
|
|
|
|
|
Execute a single Cactus test on all containers which have been defined,
|
|
|
|
|
i.e. which have a ${cactus.home.[container name]} property
|
|
|
|
|
defined. Specify the case with -Dcactus.testcase=my.test.Case
|
|
|
|
|
========================================================================
|
|
|
|
|
<!--
|
|
|
|
|
========================================================================
|
|
|
|
|
Execute a single Cactus test on all containers which have been defined,
|
|
|
|
|
i.e. which have a ${cactus.home.[container name]} property
|
|
|
|
|
defined. Specify the case with -Dtestcase=my.single.TestCase
|
|
|
|
|
========================================================================
|
|
|
|
|
-->
|
|
|
|
|
<goal name="cactus:single" prereqs="cactus:init,cactus:cactifywar"
|
|
|
|
|
description="Run a single Cactus Test Case">
|
|
|
|
|
|
|
|
|
|
<j:set var="testcase__" value="${testcase}X"/>
|
|
|
|
|
<j:if test="${testcase__ == 'X'}">
|
|
|
|
|
<ant:fail>You must provide a test case using -Dtestcase=my.single.TestCase</ant:fail>
|
|
|
|
|
</j:if>
|
|
|
|
|
|
|
|
|
|
<cactus warfile="${maven.build.dir}/${pom.artifactId}-cactus.war"
|
|
|
|
|
<j:choose>
|
|
|
|
|
<j:when test="${empty(testcase)}">
|
|
|
|
|
<echo>
|
|
|
|
|
You must define the test case to run via -Dtestcase=classname
|
|
|
|
|
Example: maven -Dtestcase=MyTest cactus:single
|
|
|
|
|
</echo>
|
|
|
|
|
</j:when>
|
|
|
|
|
|
|
|
|
|
<j:otherwise>
|
|
|
|
|
<cactus warfile="${maven.build.dir}/${pom.artifactId}-cactus.war"
|
|
|
|
|
fork="yes" errorproperty="cactustests.error"
|
|
|
|
|
failureproperty="cactustests.failure"
|
|
|
|
|
printsummary="${maven.cactus.printsummary}">
|
|
|
|
|
@@ -439,9 +449,116 @@
|
|
|
|
|
<ant:formatter type="xml"/>
|
|
|
|
|
<!-- Run only a single testcase passed in via -Dtestcase=my.single.TestCase-->
|
|
|
|
|
<ant:test name="${testcase}"/>
|
|
|
|
|
</cactus>
|
|
|
|
|
</cactus>
|
|
|
|
|
</j:otherwise>
|
|
|
|
|
</j:choose>
|
|
|
|
|
</goal>
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
========================================================================
|
|
|
|
|
Execute a Cactus tests on all containers which have been defined,
|
|
|
|
|
i.e. which have a ${cactus.home.[container name]} property
|
|
|
|
|
defined. Specify the matching tests with -Dmatch=FooTest
|
|
|
|
|
========================================================================
|
|
|
|
|
-->
|
|
|
|
|
<goal name="cactus:match" prereqs="cactus:init,cactus:cactifywar"
|
|
|
|
|
description="Execute all the Cactus tests matching the given 'testmatch' variable">
|
|
|
|
|
|
|
|
|
|
<j:choose>
|
|
|
|
|
<j:when test="${empty(testmatch)}">
|
|
|
|
|
<echo>
|
|
|
|
|
You must define the test case to match via -Dtestmatch=classname
|
|
|
|
|
Example: maven -Dtestmatch=MyTest cactus:match
|
|
|
|
|
</echo>
|
|
|
|
|
</j:when>
|
|
|
|
|
|
|
|
|
|
<j:otherwise>
|
|
|
|
|
<cactus warfile="${maven.build.dir}/${pom.artifactId}-cactus.war"
|
|
|
|
|
fork="yes" errorproperty="cactustests.error"
|
|
|
|
|
failureproperty="cactustests.failure"
|
|
|
|
|
printsummary="${maven.cactus.printsummary}">
|
|
|
|
|
<ant:classpath>
|
|
|
|
|
<ant:pathelement path="${maven.build.dest}"/>
|
|
|
|
|
<ant:pathelement location="${cactus.target.classes.dir}"/>
|
|
|
|
|
<ant:path refid="maven.dependency.classpath"/>
|
|
|
|
|
<ant:path refid="cactus.classpath"/>
|
|
|
|
|
</ant:classpath>
|
|
|
|
|
<containerset>
|
|
|
|
|
<!-- TODO: Find how to set the port for JBoss 3x -->
|
|
|
|
|
<jboss3x if="cactus.home.jboss3x"
|
|
|
|
|
dir="${cactus.home.jboss3x}"
|
|
|
|
|
output="${cactus.reports.dir}/jboss3x.out"
|
|
|
|
|
todir="${cactus.reports.dir}/jboss3x"
|
|
|
|
|
config="${cactus.jboss3x.config.name}"/>
|
|
|
|
|
|
|
|
|
|
<orion1x if="cactus.home.orion1x"
|
|
|
|
|
dir="${cactus.home.orion1x}" port="${cactus.port}"
|
|
|
|
|
output="${cactus.reports.dir}/orion1x.out"
|
|
|
|
|
todir="${cactus.reports.dir}/orion1x"/>
|
|
|
|
|
|
|
|
|
|
<orion2x if="cactus.home.orion2x"
|
|
|
|
|
dir="${cactus.home.orion2x}" port="${cactus.port}"
|
|
|
|
|
output="${cactus.reports.dir}/orion2x.out"
|
|
|
|
|
todir="${cactus.reports.dir}/orion2x"/>
|
|
|
|
|
|
|
|
|
|
<resin2x if="cactus.home.resin2x"
|
|
|
|
|
dir="${cactus.home.resin2x}" port="${cactus.port}"
|
|
|
|
|
output="${cactus.reports.dir}/resin2x.out"
|
|
|
|
|
todir="${cactus.reports.dir}/resin2x">
|
|
|
|
|
<j:if test="${context.getVariable('cactus.resin2x.config') != null}">
|
|
|
|
|
<ant:setProperty name="resinconf" value="${cactus.resin2x.config}"/>
|
|
|
|
|
</j:if>
|
|
|
|
|
</resin2x>
|
|
|
|
|
|
|
|
|
|
<tomcat4x if="cactus.home.tomcat4x"
|
|
|
|
|
dir="${cactus.home.tomcat4x}" port="${cactus.port}"
|
|
|
|
|
output="${cactus.reports.dir}/tomcat4x.out"
|
|
|
|
|
todir="${cactus.reports.dir}/tomcat4x">
|
|
|
|
|
<j:if test="${context.getVariable('cactus.tomcat4x.config') != null}">
|
|
|
|
|
<ant:setProperty name="serverxml" value="${cactus.tomcat4x.config}"/>
|
|
|
|
|
</j:if>
|
|
|
|
|
<j:if test="${context.getVariable('cactus.tomcat4x.tmpdir') != null}">
|
|
|
|
|
<ant:setProperty name="tmpdir" value="${cactus.tomcat4x.tmpdir}"/>
|
|
|
|
|
</j:if>
|
|
|
|
|
<j:if test="${context.getVariable('cactus.tomcat4x.conf.dir') != null}">
|
|
|
|
|
<conf dir="${cactus.tomcat4x.conf.dir}"
|
|
|
|
|
includes="${cactus.tomcat4x.conf.includes}"
|
|
|
|
|
excludes="${cactus.tomcat4x.conf.excludes}"/>
|
|
|
|
|
</j:if>
|
|
|
|
|
</tomcat4x>
|
|
|
|
|
|
|
|
|
|
<tomcat5x if="cactus.home.tomcat5x"
|
|
|
|
|
dir="${cactus.home.tomcat5x}" port="${cactus.port}"
|
|
|
|
|
output="${cactus.reports.dir}/tomcat5x.out"
|
|
|
|
|
todir="${cactus.reports.dir}/tomcat5x">
|
|
|
|
|
<j:if test="${context.getVariable('cactus.tomcat5x.config') != null}">
|
|
|
|
|
<ant:setProperty name="serverxml" value="${cactus.tomcat5x.config}"/>
|
|
|
|
|
</j:if>
|
|
|
|
|
<j:if test="${context.getVariable('cactus.tomcat5x.tmpdir') != null}">
|
|
|
|
|
<ant:setProperty name="tmpdir" value="${cactus.tomcat5x.tmpdir}"/>
|
|
|
|
|
</j:if>
|
|
|
|
|
<j:if test="${context.getVariable('cactus.tomcat5x.conf.dir') != null}">
|
|
|
|
|
<conf dir="${cactus.tomcat5x.conf.dir}"
|
|
|
|
|
includes="${cactus.tomcat5x.conf.includes}"
|
|
|
|
|
excludes="${cactus.tomcat5x.conf.excludes}"/>
|
|
|
|
|
</j:if>
|
|
|
|
|
</tomcat5x>
|
|
|
|
|
|
|
|
|
|
</containerset>
|
|
|
|
|
<ant:formatter type="plain" usefile="${cactus.junit.usefile}"/>
|
|
|
|
|
<ant:formatter type="xml"/>
|
|
|
|
|
<!-- Run all testcases matched via -Dtestmatch=FooTest-->
|
|
|
|
|
<ant:batchtest>
|
|
|
|
|
<ant:fileset dir="${cactus.src.dir}">
|
|
|
|
|
<include name="**/${testmatch}.java"/>
|
|
|
|
|
</ant:fileset>
|
|
|
|
|
</ant:batchtest>
|
|
|
|
|
</cactus>
|
|
|
|
|
</j:otherwise>
|
|
|
|
|
</j:choose>
|
|
|
|
|
</goal>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
========================================================================
|
|
|
|
|
Register a Cactus report.
|
|
|
|
|
|