dims 2002/06/06 12:00:42
Modified: java build.xml
java/test build_functional_tests.xml
Log:
Ability to run a single test case. For example to run the MultithreadTestCase the
ant parameters are as follows:
ant -Ddeploy.xml.property=build\work\samples\addr\deploy.wsdd
-Dundeploy.xml.property=build\work\samples\addr\undeploy.wsdd
-Dtest.functional.testcase=MultithreadTestCase functional-tests-only
This will command will do the following:
1. Start the SimpleAxisServer
2. deploy the build\work\samples\addr\deploy.wsdd
3. then execute MultithreadTestCase
4. undeploy using deploy the build\work\samples\addr\deploy.wsdd
5. Stop the SimpleAxisServer
Revision Changes Path
1.143 +1 -1 xml-axis/java/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/build.xml,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- build.xml 5 Jun 2002 15:47:19 -0000 1.142
+++ build.xml 6 Jun 2002 19:00:42 -0000 1.143
@@ -475,7 +475,7 @@
>
<!-- The Axis Ant task must be built (into ANT_HOME/lib)... -->
- <ant antfile="test/build_ant.xml" />
+ <ant antfile="test/build_functional_tests.xml" target="functional-tests-only"/>
<!--
...and then the functional tests can be run. If this step yields a
1.45 +53 -1 xml-axis/java/test/build_functional_tests.xml
Index: build_functional_tests.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/test/build_functional_tests.xml,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- build_functional_tests.xml 4 Jun 2002 17:50:37 -0000 1.44
+++ build_functional_tests.xml 6 Jun 2002 19:00:42 -0000 1.45
@@ -82,7 +82,7 @@
</target>
<!-- =================================================================== -->
- <!-- Runs the JUnit functional test -->
+ <!-- Runs the JUnit functional test -->
<!-- =================================================================== -->
<target name="junit-functional" if="junit.present"
depends="junit-functional-prepare">
<java classname="org.apache.axis.client.AdminClient" fork="yes">
@@ -291,6 +291,58 @@
stopTarget="stop-functional-test-http-server-secure" />
</target>
+
+ <!-- =================================================================== -->
+ <!-- Run functional tests ONLY -->
+ <!-- =================================================================== -->
+ <target name="functional-tests-only" if="junit.present">
+
+ <!-- This uses a custom Ant task. See
test/functional/ant/RunAxisFunctionalTests.java -->
+ <!-- This pattern taken from Cactus, http://jakarta.apache.org/commons/cactus
-->
+ <runaxisfunctionaltests
+ url="http://localhost:8088"
+ startTarget1="start-functional-test-tcp-server"
+ startTarget2="start-functional-test-http-server"
+ testTarget="junit-functional-tests-only"
+ stopTarget="stop-functional-test-http-server" />
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- Runs the JUnit functional tests ONLY -->
+ <!-- =================================================================== -->
+ <target name="junit-functional-tests-only" if="junit.present"
depends="junit-functional-prepare">
+ <java classname="org.apache.axis.client.AdminClient" fork="yes">
+ <classpath refid="test-classpath" />
+ <arg line="${deploy.xml.property}"/>
+ </java>
+
+ <!-- now, run the actual test -->
+ <junit dir="." printsummary="yes" haltonfailure="${test.functional.fail}"
fork="yes">
+ <!-- Pass through the proxy parameters -->
+ <jvmarg value="-Dhttp.proxyHost=${http.proxyHost}"/>
+ <jvmarg value="-Dhttp.proxyPort=${http.proxyPort}"/>
+ <jvmarg value="-Dhttp.nonProxyHosts=${http.nonProxyHosts}"/>
+ <jvmarg value="-Dhttp.proxyUser=${http.proxyUser}"/>
+ <jvmarg value="-Dhttp.proxyPassword=${http.proxyPassword}"/>
+ <!-- Pass the port for SimpleAxisServer -->
+ <jvmarg
value="-Dtest.functional.SimpleAxisPort=${test.functional.SimpleAxisPort}"/>
+ <classpath refid="test-classpath" />
+ <formatter type="xml" usefile="${test.functional.usefile}"/>
+ <batchtest todir="${test.functional.reportdir}">
+ <fileset dir="${build.dest}">
+ <!-- Convention: each package that's being tested
+ has its own test class collecting all the tests -->
+ <include name="**/${test.functional.testcase}.class" />
+ </fileset>
+ </batchtest>
+ </junit>
+
+ <java classname="org.apache.axis.client.AdminClient" fork="yes">
+ <classpath refid="test-classpath" />
+ <arg line="${undeploy.xml.property}"/>
+ </java>
+ </target>
+
<!-- =================================================================== -->
<!-- Runs the JUnit functional test, with special class parameter. -->