You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by se...@apache.org on 2002/08/22 20:30:18 UTC
cvs commit: xml-axis/java/test/httpunit build.xml
seibert 2002/08/22 11:30:18
Modified: java/test/httpunit build.xml
Log:
Steve's file... I hope I didn't fudge it up too badly
Revision Changes Path
1.2 +141 -26 xml-axis/java/test/httpunit/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-axis/java/test/httpunit/build.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.xml 23 Jul 2002 23:42:49 -0000 1.1
+++ build.xml 22 Aug 2002 18:30:18 -0000 1.2
@@ -1,39 +1,154 @@
<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE project [
+ <!ENTITY properties SYSTEM "file:../../xmls/properties.xml">
+ <!ENTITY paths SYSTEM "file:../../xmls/path_refs.xml">
+ <!ENTITY taskdefs SYSTEM "file:../../xmls/taskdefs.xml">
+ <!ENTITY taskdefs_post_compile SYSTEM "file:../../xmls/taskdefs_post_compile.xml">
+ <!ENTITY targets SYSTEM "file:../../xmls/targets.xml">
+]>
+
+<!-- ===================================================================
+<description>
+ Test/Sample Component file for Axis
+
+Notes:
+ This is a build file for use with the Jakarta Ant build tool.
+
+Prerequisites:
+
+ jakarta-ant from http://jakarta.apache.org
+
+Build Instructions:
+ To compile
+ ant <target>
+ To execute
+ ant <target>
+
+Author:
+
+Copyright:
+ Copyright (c) 2002-2003 Apache Software Foundation.
+</description>
+==================================================================== -->
<project name="httpunit" default="default" basedir=".">
+ <description>
+ Test a Web application with HttpUnit. Based on example code in
+ Java Development with Ant, Hatcher and Loughran, 2001.
+ Customised for Axis by Steve Loughran.
+ 1. Needs XSLT support from Xalan to generate the reports.
+ 2. To run a single test, set testcase=the name of the test.
+ 3. default URL is http://localhost:8080/axis ; set the
+ axis.url property to target a different system or port.
+ </description>
+
+<!-- BEGIN TOPLEVEL DECLARATIONS -->
+
+ <property name="axis.home" location="../.." />
+
+ <!-- Load the application specific settings -->
+ <!-- #Project specific props -->
+ <property file="build.properties"/>
+
+
+ &properties;
+ &paths;
+ <!-- &taskdefs; -->
+ <!-- &taskdefs_post_compile; -->
+
+
+ <!-- ========================================================== -->
+ <!-- Test settings -->
+ <!-- ========================================================== -->
- <property name="axis.home" location="../.."/>
- <property name="invoke.target.file" value="buildComponent.xml"/>
- <target name="clean">
- <ant antfile="${invoke.target.file}"
- target="clean"/>
- </target>
+ <property name="axis.url" value="http://localhost:8080/axis"/>
- <target name="copy">
- <ant antfile="${invoke.target.file}"
- target="copy"/>
- </target>
- <target name="default" >
- <ant antfile="${invoke.target.file}"
- target="default"/>
- </target>
+ <target name="copy"/>
- <target name="deploy">
- <ant antfile="${invoke.target.file}"
- target="deploy"/>
- </target>
+ <target name="deploy"/>
- <target name="run">
- <ant antfile="${invoke.target.file}"
- target="run"/>
- </target>
+ <target name="run" depends="test"/>
- <target name="undeploy">
- <ant antfile="${invoke.target.file}"
- target="undeploy"/>
- </target>
+ <target name="undeploy"/>
+
+
+ <path id="test.compile.classpath">
+ <fileset dir="lib" includes="**/*.jar" />
+ </path>
+
+ <path id="test.classpath">
+ <path refid="test.compile.classpath"/>
+ <pathelement location="${test.classes.dir}"/>
+ </path>
+ <!-- END TOPLEVEL DECLARATIONS -->
+ <!-- Public Targets -->
+
+ <target name="default"
+ depends="compile"
+ />
+
+ <!-- cleanup target -->
+ <target name="clean" description="cleanup"/>
+
+ <!-- init configures things -->
+ <target name="init" >
+ <echo> Axis home=${axis.home}</echo>
+ <mkdir dir="${test.classes.dir}" />
+ <mkdir dir="${test.data.dir}" />
+ <mkdir dir="${test.reports.dir}" />
+ </target>
+
+ <!-- compile the java sources using the compilation classpath -->
+ <target name="compile" depends="init">
+ <property name="build.debuglevel" value="lines,vars,source"/>
+ <javac destdir="${test.classes.dir}"
+ debug="${build.debug}"
+ includeAntRuntime="false"
+ srcdir="src">
+ <classpath refid="test.compile.classpath"/>
+ </javac>
+ </target>
+
+ <!-- this is our test suite for httpunit -->
+
+ <target name="run-test"
+ depends="compile"
+ description="test axis on a server" >
+ <junit printsummary="false"
+ errorProperty="test.failed"
+ failureProperty="test.failed"
+ haltonfailure="false"
+ fork="true">
+ <classpath
+ refid="test.classpath"/>
+ <sysproperty key="server.url"
+ value="${axis.url}"/>
+ <formatter type="xml"/>
+ <formatter type="brief" usefile="false"/>
+ <test name="${testcase}" if="testcase"/>
+ <batchtest todir="${test.data.dir}" unless="testcase">
+ <fileset dir="src" includes="**/*Test.java"/>
+ </batchtest>
+ </junit>
+ </target>
+
+ <!-- generate any test reports and fail, if needed -->
+ <target name="test" depends="run-test" if="test.failed">
+ <junitreport todir="${test.data.dir}">
+ <fileset dir="${test.data.dir}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${test.reports.dir}"/>
+ </junitreport>
+
+ <!-- bail out -->
+ <fail message="Functional tests failed - see ${test.reports.dir}" />
+ </target>
+
+
</project>
+