Author: rich
Date: Thu Apr 28 16:13:25 2005
New Revision: 165226
URL: http://svn.apache.org/viewcvs?rev=165226&view=rev
Log:
This is a contribution from Julie Zhuo to address
http://issues.apache.org/jira/browse/BEEHIVE-545 : Add the struts 1.1 bvts to
the test distribution. Thanks Julie!
tests: drt in trunk, build.dist.full/build.test.dist in trunk, run.tests
against the distribution (WinXP)
BB: self (linux)
Modified:
incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml
incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties
incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml
incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml
incubator/beehive/trunk/netui/test/dist-test/build.xml
incubator/beehive/trunk/netui/test/webapps/drt/build.xml
incubator/beehive/trunk/netui/test/webapps/jsf/build.xml
Modified: incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml?rev=165226&r1=165225&r2=165226&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/netui-build.xml Thu Apr 28
16:13:25 2005
@@ -11,16 +11,6 @@
<import file="../test-imports.xml"/>
<import file="${test.home}/netui/ant/test-imports.xml"/>
- <path id="test.classpath">
- <pathelement path="${test.classes.dir}/junitTests"/>
- <fileset dir="${dist.home}/lib">
- <include name="**/*.jar"/>
- </fileset>
- <pathelement path="${junit.jar}"/>
- <pathelement path="${servlet24.jar}"/>
- <pathelement path="${jsp20.jar}"/>
- </path>
-
<!-- ================================================================ -->
<!-- -->
<!-- Target to run all drt/bvt tests -->
@@ -28,31 +18,168 @@
<!-- ================================================================ -->
<target name="run.tests" description="Run all tests">
<sequential>
- <antcall target="prepare.netui.testweb"/>
<antcall target="dist.drt"/>
<antcall target="dist.bvt">
- <param name="test.continue" value="true"/>
- </antcall>
+ <param name="prepare.notRequired"
value="true"></param>
+ <param name="clean.notRequired" value="true"></param>
+ <param name="build.notRequired" value="true"></param>
+ </antcall>
+ <antcall target="dist.bvt.struts11">
+ <param name="prepare.notRequired"
value="true"></param>
+ </antcall>
+ <antcall target="dist.jsf.bvt"></antcall>
+ <antcall target="dist.jsf.bvt.struts11">
+ <param name="prepare.notRequired"
value="true"></param>
+ </antcall>
</sequential>
</target>
- <target name="prepare.netui.testweb" description="Prepare netui test web
in the build area">
- <copy todir="${build.dir}/webapps">
- <fileset dir="${test.dir}/webapps"/>
+ <target name="dist.drt" description="Run the drt tests - coreWeb with
struts12">
+ <antcall target="prepare.netui.testweb">
+ <param name="webapp.name" value="coreWeb"></param>
+ </antcall>
+ <antcall target="clean.testWeb">
+ <param name="webapp.name" value="coreWeb"></param>
+ </antcall>
+ <antcall target="build.testWeb">
+ <param name="struts.version" value="1.2"></param>
+ <param name="webapp.name" value="coreWeb"></param>
+ </antcall>
+ <antcall target="junit.test">
+ <param name="webapp.name" value="coreWeb"></param>
+ <param name="testResults.dir"
value="${netui.testResults.dir}/coreWeb/drt.testResults"></param>
+ <param name="fail" value="true"></param>
+ </antcall>
+ <antcall target="testRecorder.drt">
+ <param name="webapp.name" value="coreWeb"></param>
+ <param name="suite.name" value="drt"></param>
+ <param name="testRecorder.testResults.dir"
value="${netui.testResults.dir}/coreWeb/testRecorder"/>
+ </antcall>
+ </target>
+
+ <target name="dist.bvt" description="Run the bvt tests - coreWeb with
struts12">
+ <antcall target="prepare.netui.testweb">
+ <param name="webapp.name"
value="coreWeb"></param>
+ </antcall>
+ <antcall target="clean.testWeb">
+ <param name="webapp.name"
value="coreWeb"></param>
+ </antcall>
+ <antcall target="build.testWeb">
+ <param name="struts.version" value="1.2"></param>
+ <param name="webapp.name" value="coreWeb"></param>
+ </antcall>
+ <antcall target="junit.test">
+ <param name="webapp.name" value="coreWeb"></param>
+ <param name="testResults.dir"
value="${netui.testResults.dir}/coreWeb/bvt.testResults"></param>
+ <param name="fail" value="false"></param>
+ </antcall>
+ <antcall target="testRecorder.bvt">
+ <param name="webapp.name" value="coreWeb"></param>
+ <param name="suite.name" value="bvt"></param>
+ <param name="testRecorder.testResults.dir"
value="${netui.testResults.dir}/coreWeb/testRecorder"/>
+ </antcall>
+ </target>
+
+ <target name="dist.jsf.bvt" description="Run the jsf bvt tests - jsfWeb
with struts12">
+ <antcall target="prepare.netui.testweb">
+ <param name="webapp.name" value="jsfWeb"></param>
+ </antcall>
+ <antcall target="clean.testWeb">
+ <param name="webapp.name" value="jsfWeb"></param>
+ </antcall>
+ <antcall target="build.testWeb">
+ <param name="struts.version" value="1.2"></param>
+ <param name="webapp.name" value="jsfWeb"></param>
+ <param name="test.jsf" value="true"></param>
+ </antcall>
+ <antcall target="junit.test">
+ <param name="webapp.name" value="jsfWeb"></param>
+ <param name="testResults.dir"
value="${netui.testResults.dir}/jsfWeb/bvt.testResults"></param>
+ <param name="fail" value="false"></param>
+ </antcall>
+ <antcall target="testRecorder.bvt">
+ <param name="webapp.name" value="jsfWeb"></param>
+ <param name="suite.name" value="bvt"></param>
+ <param name="testRecorder.testResults.dir"
value="${netui.testResults.dir}/jsfWeb/testRecorder"/>
+ </antcall>
+ </target>
+
+ <target name="dist.bvt.struts11" description="Run the bvt tests against
struts11">
+ <antcall target="prepare.netui.testweb">
+ <param name="webapp.name" value="coreWeb"></param>
+ </antcall>
+ <antcall target="clean.testWeb">
+ <param name="webapp.name" value="coreWeb"></param>
+ </antcall>
+ <antcall target="build.testWeb">
+ <param name="struts.version" value="1.1"></param>
+ <param name="webapp.name" value="coreWeb"></param>
+ </antcall>
+ <antcall target="junit.test">
+ <param name="webapp.name" value="coreWeb"></param>
+ <param name="testResults.dir"
value="${netui.testResults.dir}/coreWeb/struts11/bvt.testResults"></param>
+ <param name="fail" value="false"></param>
+ </antcall>
+ <antcall target="testRecorder.bvt">
+ <param name="webapp.name" value="coreWeb"></param>
+ <param name="suite.name" value="bvt.struts11"/>
+ <param name="testRecorder.testResults.dir"
value="${netui.testResults.dir}/coreWeb/struts11/testRecorder"/>
+ </antcall>
+ </target>
+
+ <target name="dist.jsf.bvt.struts11" description="Run the jsf bvt tests
against struts11">
+ <antcall target="prepare.netui.testweb">
+ <param name="webapp.name" value="jsfWeb"></param>
+ </antcall>
+ <antcall target="clean.testWeb">
+ <param name="webapp.name" value="jsfWeb"></param>
+ </antcall>
+ <antcall target="build.testWeb">
+ <param name="struts.version" value="1.1"></param>
+ <param name="webapp.name" value="jsfWeb"></param>
+ <param name="test.jsf" value="true"></param>
+ </antcall>
+ <antcall target="junit.test">
+ <param name="webapp.name" value="jsfWeb"></param>
+ <param name="testResults.dir"
value="${netui.testResults.dir}/jsfWeb/struts11/bvt.testResults"></param>
+ <param name="fail" value="false"></param>
+ </antcall>
+ <antcall target="testRecorder.bvt">
+ <param name="webapp.name" value="jsfWeb"></param>
+ <param name="suite.name" value="bvt"/>
+ <param name="testRecorder.testResults.dir"
value="${netui.testResults.dir}/jsfWeb/struts11/testRecorder"/>
+ </antcall>
+ </target>
+
+
+
+ <!-- ================================================================
-->
+ <!-- -->
+ <!-- Targets for preparing test webs -->
+ <!-- -->
+ <!-- ================================================================ -->
+
+ <target name="prepare.netui.testweb" unless="prepare.notRequired"
+ description="Prepare netui
test web in the build area">
+ <copy todir="${build.dir}/webapps/${webapp.name}">
+ <fileset dir="${test.dir}/webapps/${webapp.name}"/>
</copy>
- </target>
-
-
- <target name="dist.drt" description="Run the drt tests">
- <antcall target="junit.drt"/>
- <antcall target="testRecorder.drt"/>
- </target>
-
- <target name="dist.bvt" description="Run the bvt tests">
- <antcall target="junit.bvt"/>
- <antcall target="testRecorder.bvt"/>
- </target>
-
+ </target>
+
+ <target name="clean.testWeb" unless="clean.notRequired"
+ description="Clean out the testWeb">
+ <ant antfile="${test.dir}/ant/testWebBuild.xml" inheritAll="false"
target="clean">
+ <property name="webapp.name" value="${webapp.name}"/>
+ </ant>
+ </target>
+
+ <target name="build.testWeb" unless="build.notRequired"
+ description="build the testWeb">
+ <ant antfile="${test.dir}/ant/testWebBuild.xml" inheritAll="false"
target="build">
+ <property name="webapp.name" value="${webapp.name}"/>
+ <property name="struts.version"
value="${struts.version}"/>
+ </ant>
+ </target>
<!-- ================================================================ -->
<!-- -->
@@ -60,47 +187,54 @@
<!-- -->
<!-- ================================================================ -->
- <target name="junit.drt" description="Run JUnit drt test suite">
+ <target name="junit.test" description="Run JUnit test suite">
+ <path id="test.classpath">
+ <pathelement path="${test.classes.dir}/junitTests"/>
+ <fileset dir="${build.dir}/webapps/${webapp.name}/WEB-INF/lib">
+ <include name="**/*.jar"/>
+ </fileset>
+ <pathelement path="${junit.jar}"/>
+ <pathelement path="${servlet24.jar}"/>
+ <pathelement path="${jsp20.jar}"/>
+ </path>
+
<ant dir="${test.dir}/ant" antfile="junitCore.xml" target="run.tests"
inheritAll="false">
+ <property name="webapp.name" value="${webapp.name}"/>
<property name="test.home" value="${test.home}"/>
<property name="test.dir" value="${test.dir}"/>
- <property name="testout.dir" value="${drt.testResults.dir}"/>
- <reference refid="test.classpath"/>
- <property name="formatter.type" value="xml"/>
- <property name="fail" value="true"/>
- </ant>
- </target>
-
- <target name="junit.bvt" description="Run JUnit bvt test suite">
- <ant dir="${test.dir}/ant" antfile="junitCore.xml" target="run.tests">
- <property name="test.home" value="${test.home}"/>
- <property name="test.dir" value="${test.dir}"/>
- <property name="testout.dir" value="${bvt.testResults.dir}"/>
+ <property name="testout.dir" value="${testResults.dir}"/>
<reference refid="test.classpath"/>
<property name="formatter.type" value="xml"/>
- <property name="fail" value="false"/>
+ <property name="fail" value="${fail}"/>
</ant>
</target>
-
<!-- ================================================================ -->
<!-- -->
<!-- Targets for running test recorder test suites -->
<!-- -->
<!-- ================================================================ -->
- <target name="testRecorder.drt" description="Run the drt suite with full
server start / stop support.">
+ <target name="testRecorder.drt" description="Run the testRecorder drt test
with full server start / stop support.">
<ant antfile="${test.dir}/ant/testWebBuild.xml" inheritAll="false"
target="drt">
+ <property name="webapp.name" value="${webapp.name}"/>
<property name="test.home" value="${test.home}"/>
+ <property name="suite.name" value="${suite.name}"/>
<property name="test.dir" value="${test.dir}"/>
+ <property name="_report.root.dir"
value="${testRecorder.testResults.dir}"/>
+ <property name="_testRecorder.base.dir"
value="${build.dir}/testRecorder/${webapp.name}"/>
</ant>
</target>
-
- <target name="testRecorder.bvt" description="Run the bvt suite with full
server start / stop support.">
+
+ <target name="testRecorder.bvt" description="Run the testRecorder bvt
test with full server start / stop support.">
<ant antfile="${test.dir}/ant/testWebBuild.xml" inheritAll="false"
target="bvt">
+ <property name="webapp.name" value="${webapp.name}"/>
<property name="test.home" value="${test.home}"/>
+ <property name="suite.name" value="${suite.name}"/>
<property name="test.dir" value="${test.dir}"/>
+ <property name="_report.root.dir"
value="${testRecorder.testResults.dir}"/>
+ <property name="_testRecorder.base.dir"
value="${build.dir}/testRecorder/${webapp.name}"/>
</ant>
- </target>
-
+ </target>
+
</project>
Modified: incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties?rev=165226&r1=165225&r2=165226&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties
(original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/netui-test.properties Thu
Apr 28 16:13:25 2005
@@ -10,17 +10,11 @@
# netui tests
test.classes.dir=${test.dir}/junit
-# netui Test Webapp properties
-webapp.name=coreWeb
-webapp.dir=${build.dir}/webapps/${webapp.name}
-webapp.waitfor.url=${server.root.url}/${webapp.name}
-
# Webapp build properties
netuiconfig.xml.name=netui-config.xml
buildWebapp.ant=${dist.home}/ant/buildWebapp.xml
-webapp.waitfor.url=http://localhost:8080/${webapp.name}
app.build.file=${test.dir}/ant/testWebBuild.xml
# External JARs
@@ -29,9 +23,11 @@
ant-junit.jar=${os.ANT_HOME}/lib/ant-junit.jar
-log4j.jar=${webapp.dir}/WEB-INF/lib/log4j-1.2.8.jar
-jsr173.jar=${webapp.dir}/WEB-INF/lib/jsr173_1.0_api.jar
-xbean.jar=${webapp.dir}/WEB-INF/lib/apache-xbean.jar
+struts11.dir=${test.dir}/struts/struts1.1
+struts12.dir=${test.dir}/struts/struts1.2
+
+jsf.dir=${test.dir}/jsf/myfaces-1.0.7
+jsf.dist=myfaces
# Netui test JARs/resources
testRecorder.config.name=netui-server-drt-config
@@ -41,12 +37,10 @@
test-recorder.jar.name=testRecorder.jar
test-recorder.jar=${testRecorder.dir}/lib/${test-recorder.jar.name}
-commons-logging.jar=${webapp.dir}/WEB-INF/lib/commons-logging-1.0.4.jar
httpClient.jar.name=commons-httpclient-2.0.jar
httpClient.jar=${testRecorder.dir}/lib/${httpClient.jar.name}
-drt.testResults.dir=${test.result.root}/netui/drt.testResults
-bvt.testResults.dir=${test.result.root}/netui/bvt.testResults
+netui.testResults.dir=${test.result.root}/netui
netui.ant.dir=${test.dir}/ant
Modified: incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml?rev=165226&r1=165225&r2=165226&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/test-imports.xml Thu Apr
28 16:13:25 2005
@@ -44,5 +44,38 @@
<pathelement path="${servlet24.jar}"/>
<pathelement path="${jsp20.jar}"/>
</path>
+
+ <patternset id="struts11.jars">
+ <include name="commons-beanutils.jar"/>
+ <include name="commons-collections.jar"/>
+ <include name="commons-digester.jar"/>
+ <include name="commons-fileupload.jar"/>
+ <include name="commons-lang.jar"/>
+ <include name="commons-logging.jar"/>
+ <include name="commons-validator.jar"/>
+ <include name="jakarta-oro.jar"/>
+ <include name="struts-legacy.jar"/>
+ <include name="struts.jar"/>
+ </patternset>
+
+ <patternset id="struts12.jars">
+ <include name="commons-beanutils.jar"/>
+ <include name="commons-collections.jar"/>
+ <include name="commons-digester.jar"/>
+ <include name="commons-fileupload.jar"/>
+ <include name="commons-logging.jar"/>
+ <include name="commons-validator.jar"/>
+ <include name="jakarta-oro.jar"/>
+ <include name="struts.jar"/>
+ </patternset>
+
+
+ <patternset id="struts11.webinf">
+ <include name="validator-rules.xml"/>
+ </patternset>
+
+ <patternset id="struts12.webinf">
+ <include name="validator-rules.xml"/>
+ </patternset>
</project>
Modified: incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml?rev=165226&r1=165225&r2=165226&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml Thu Apr
28 16:13:25 2005
@@ -12,13 +12,14 @@
<import file="../../test-imports.xml"/>
<import file="test-imports.xml"/>
+ <property file="${test.home}/netui/ant/webapp.properties"/>
<!-- ================================================================ -->
<!-- -->
<!-- Targets for building a webapp -->
<!-- -->
<!-- ================================================================ -->
- <target name="build" description="Build the coreWeb using the
distribution" unless="test.continue">
+ <target name="build" description="Build the coreWeb using the
distribution">
<echo message="--------------------------------------------------"/>
<echo message="| NetUI test webApp build starting |"/>
@@ -26,39 +27,76 @@
<antcall target="prepare.testRecorder"/>
<antcall target="update.runtime"/>
+
+ <!-- Clean out existing struts resources -->
+ <antcall target="struts.clean">
+ <param name="struts.version" value="1.1"/>
+ </antcall>
+ <antcall target="struts.clean">
+ <param name="struts.version" value="1.2"/>
+ </antcall>
+
+ <!-- Deploy required resources -->
+ <antcall target="deploy.struts"/>
<antcall target="deploy.testrecorder"/>
+ <antcall target="deploy.jsf"/>
<build-webapp webappDir="${webapp.dir}"/>
+ <!-- Touch all JSPs to ensure that they're compiled. -->
+ <touch>
+ <fileset dir="${webapp.dir}">
+ <include name="**/*.jsp"/>
+ </fileset>
+ </touch>
+
<echo message="--------------------------------------------------"/>
<echo message="| NetUI test webApp build ending |"/>
<echo message="--------------------------------------------------"/>
</target>
<target name="prepare.testRecorder" description="prepare test recorder
in the build area">
- <copy todir="${_testRecorder.base.dir}/config">
- <fileset dir="${test.dir}/testRecorder/config"/>
+ <copy todir="${_testRecorder.base.dir}/${webapp.name}/config">
+ <fileset
dir="${test.dir}/testRecorder/${webapp.name}/config"/>
<filterset>
- <filter token="BASE_DIR" value="${_testRecorder.base.dir}"/>
+ <filter token="BASE_DIR"
value="${_testRecorder.base.dir}/${webapp.name}"/>
+ <!-- Still correct location for DOMAIN? -->
<filter token="DOMAIN_DIR" value="${test.dir}"/>
</filterset>
</copy>
<antcall target="build.config.jar"/>
</target>
- <target name="build.config.jar" description="Filter and package test
recorder config jar file">
- <jar
jarfile="${_testRecorder.base.dir}/config/${testRecorder.config.name}.jar">
- <fileset dir="${_testRecorder.base.dir}/config" includes="*.xml"/>
+ <target name="build.config.jar" description="Package test recorder
config jar file">
+ <jar
jarfile="${_testRecorder.base.dir}/${webapp.name}/config/${testRecorder.config.name}.jar">
+ <fileset dir="${_testRecorder.base.dir}/${webapp.name}/config"
includes="*.xml"/>
</jar>
<delete>
- <fileset dir="${_testRecorder.base.dir}/config" includes="*.xml"/>
+ <fileset dir="${_testRecorder.base.dir}/${webapp.name}/config"
includes="*.xml"/>
</delete>
-
</target>
-
<target name="deploy.testrecorder" description="Deploy the test recorder
to the test webapp - coreWeb at this time">
<echo>Deploying the test recorder to webapp at root:
${webapp.dir}</echo>
- <ant antfile="${test.dir}/ant/testRecorder.xml"
target="deployTestRecorder" inheritAll="false"/>
+ <ant antfile="${test.dir}/ant/testRecorder.xml"
target="deployTestRecorder" inheritAll="false">
+ <property name="_testRecorder.base.dir"
value="${build.dir}/testRecorder/${webapp.name}"/>
+ <property name="webapp.dir" value="${webapp.dir}"/>
+ </ant>
+ </target>
+
+ <target name="deploy.jsf" if="test.jsf"
+ description="deploy jsf to testWeb --
jsfWeb">
+ <echo>Deploying the myFaces to webapp at root: ${webapp.dir}</echo>
+ <property name="jsf.dist" value="myfaces"/>
+ <copy todir="${webapp.dir}/WEB-INF/lib" overwrite="true"
failonerror="true">
+ <fileset dir="${jsf.dir}/lib">
+ <include name="*.jar"/>
+ </fileset>
+ </copy>
+
+ <copy file="${webapp.dir}/WEB-INF/web.xml.${jsf.dist}"
+ tofile="${webapp.dir}/WEB-INF/web.xml"
+ overwrite="true" failonerror="true"/>
+
</target>
<target name="update.runtime" description="Update the NetUI runtime in the
webapp without building the resources">
@@ -74,9 +112,70 @@
</copy>
</target>
+
+ <target name="deploy.struts"
+ description="Deploy struts lib to testWeb">
+ <echo>struts version: ${struts.version}</echo>
+ <condition property="struts11" value="true">
+ <equals arg1="${struts.version}" arg2="1.1"/>
+ </condition>
+ <condition property="struts12" value="true">
+ <or>
+ <equals arg1="${struts.version}" arg2="1.2"/>
+ <not><isset property="struts.version"/></not>
+ </or>
+ </condition>
+ <antcall target="deploy.struts11"/>
+ <antcall target="deploy.struts12"/>
+ </target>
+
+ <target name="deploy.struts11" if="struts11"
+ description="Deploy struts11 lib to testWeb">
+ <copy todir="${webapp.dir}" overwrite="true">
+ <fileset dir="${struts11.dir}">
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="deploy.struts12" if="struts12"
+ description="Deploy struts12 lib to testWeb">
+ <copy todir="${webapp.dir}" overwrite="true">
+ <fileset dir="${struts12.dir}">
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="struts.clean"
+ description="Remove struts resources from test webapp">
+ <echo>Clean struts resource from: ${webapp.dir}</echo>
+
+ <property name="webinf.dir" location="${webapp.dir}/WEB-INF"/>
+
+ <echo>struts version: ${struts.version}</echo>
+ <condition property="struts.fileset" value="struts11">
+ <equals arg1="${struts.version}" arg2="1.1"/>
+ </condition>
+ <condition property="struts.fileset" value="struts12">
+ <or>
+ <equals arg1="${struts.version}" arg2="1.2"/>
+ <not><isset property="struts.version"/></not>
+ </or>
+ </condition>
+
+ <echo>struts.fileset: ${struts.fileset}</echo>
+
+ <delete quiet="true">
+ <fileset dir="${webapp.dir}/WEB-INF/">
+ <patternset refid="${struts.fileset}.webinf"/>
+ </fileset>
+ <fileset dir="${webapp.dir}/WEB-INF/lib">
+ <patternset refid="${struts.fileset}.jars"/>
+ </fileset>
+ </delete>
+ </target>
- <target name="clean" description="Clean the test web"
unless="test.continue">
- <echo message="Clean the webapp!"/>
+ <target name="clean" description="Clean the test web">
+ <echo message="Cleaning ${webapp.name}!"/>
<clean-webapp webappDir="${webapp.dir}"/>
<delete dir="${webapp.dir}/WEB-INF/lib"/>
<delete>
@@ -90,10 +189,8 @@
<!-- -->
<!-- ================================================================ -->
- <target name="drt" description="Run the drt suite with full server start /
stop support.">
+ <target name="drt" description="Run the test suite with full server start
/ stop support.">
<echo message="Test.dir: ${test.dir}"/>
- <antcall target="clean"/>
- <antcall target="build"/>
<ant dir="${test.dir}" antfile="${test.dir}/ant/testRecorder.xml"
inheritAll="false" target="server.test">
<property name="waitfor.url" value="${server.root.url}"/>
<property name="suite.name" value="drt"/>
@@ -103,24 +200,23 @@
<property name="test.dir" value="${test.dir}"/>
<property name="os.CATALINA_HOME" value="${tomcat.dir}"/>
<property name="dist.home" value="${dist.home}"/>
- <property name="_report.root.dir"
value="${test.result.root}/netui/testRecorder"/>
+ <property name="_report.root.dir" value="${_report.root.dir}"/>
+ <property name="_testRecorder.base.dir"
value="${build.dir}/testRecorder/${webapp.name}"/>
</ant>
</target>
-
- <target name="bvt" description="Run the bvt suite with full server start /
stop support.">
- <antcall target="clean"/>
- <antcall target="build"/>
- <ant antfile="${test.dir}/ant/testRecorder.xml" inheritAll="false"
target="server.test">
+
+ <target name="bvt" description="Run the test suite with full server
start / stop support.">
+ <echo message="Test.dir: ${test.dir}"/>
+ <ant dir="${test.dir}" antfile="${test.dir}/ant/testRecorder.xml"
inheritAll="false" target="server.test">
<property name="waitfor.url" value="${server.root.url}"/>
- <property name="suite.name" value="bvt"/>
+ <property name="suite.name" value="${suite.name}"/>
<property name="playback.webapps" value="${webapp.name}"/>
<property name="cc.mode" value="true"/>
- <property name="formatter.type" value="xml"/>
- <property name="formatter.usefile" value="true"/>
<property name="test.dir" value="${test.dir}"/>
<property name="os.CATALINA_HOME" value="${tomcat.dir}"/>
<property name="dist.home" value="${dist.home}"/>
- <property name="_report.root.dir"
value="${test.result.root}/netui/testRecorder"/>
+ <property name="_report.root.dir" value="${_report.root.dir}"/>
+ <property name="_testRecorder.base.dir"
value="${build.dir}/testRecorder/${webapp.name}"/>
</ant>
</target>
Modified: incubator/beehive/trunk/netui/test/dist-test/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/build.xml?rev=165226&r1=165225&r2=165226&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/build.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/build.xml Thu Apr 28 16:13:25
2005
@@ -11,31 +11,21 @@
<target name="build.tests" description="Build all netui tests">
<property name="test.dist.base.dir" value="${build.dir}/test-dist"/>
-
- <!-- Build the Junit tests -->
+ <!-- Build the Junit tests -->
<ant antfile="${test.dir}/ant/build.xml" target="test.build"
inheritAll="false"/>
-
-
- <!-- Build testRecorder config jar file -->
- <!--
- <ant antfile="${test.dir}/ant/testRecorder.xml"
target="build.config.jar" inheritAll="false">
- <property name="testRecorder.config.name"
value="netui-server-drt-config"/>
- <property name="test.file"
location="${app.dir}/drt/testRecorder/config/testRecorder-tests.xml"/>
- <property name="config.file"
location="${app.dir}/drt/testRecorder/config/testRecorder-config.xml"/>
- <property name="webapp.file"
location="${app.dir}/drt/testRecorder/config/testRecorder-webapp.xml"/>
- </ant>
- -->
- </target>
-
-
+ </target>
<target name="assemble.tests" description="Assemble all netui tests for
test distribution">
<!-- Clean coreWeb -->
<ant antfile="${app.dir}/drt/build.xml" target="clean"/>
-
+
+ <!-- Clean jsfWeb -->
+ <ant antfile="${app.dir}/jsf/build.xml" target="clean"/>
+
<!-- Moving files to the right place for packaging -->
<mkdir dir="${test.dist.base.dir}/beehive-test-dist"/>
<mkdir dir="${test.dist.base.dir}/beehive-test-dist/netui"/>
+ <mkdir dir="${test.dist.base.dir}/beehive-test-dist/netui/struts"/>
<mkdir dir="${test.dist.base.dir}/beehive-test-dist/controls"/>
<mkdir dir="${test.dist.base.dir}/beehive-test-dist/wsm"/>
@@ -43,7 +33,7 @@
tofile="${test.dist.base.dir}/beehive-test-dist/netui/build.xml"/>
<copy todir="${test.dist.base.dir}/beehive-test-dist/netui/ant">
- <fileset dir="${test.dir}/dist-test/ant"
includes="netui-test.properties,testRecorder.xml,test-imports.xml,testWebBuild.xml"/>
+ <fileset dir="${test.dir}/dist-test/ant"
includes="webapp.properties,netui-test.properties,testRecorder.xml,test-imports.xml,testWebBuild.xml"/>
</copy>
<copy todir="${test.dist.base.dir}/beehive-test-dist/netui/ant">
@@ -51,36 +41,76 @@
includes="junitCore.xml"/>
</copy>
+ <!-- Get test webs -->
<copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/webapps/coreWeb">
<fileset dir="${app.dir}/drt/coreWeb"/>
</copy>
+
+ <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/webapps/jsfWeb">
+ <fileset dir="${app.dir}/jsf/jsfWeb"/>
+ </copy>
+ <!-- Get Junit tests -->
<copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/junit/junitTests/org">
<fileset dir="${test.classes.dir}/junitTests/org"/>
</copy>
-
- <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/config">
+
+ <!-- Get general testRecorder resources -->
+ <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder">
+ <fileset dir="${build.dir}/tools/testRecorder"/>
+ </copy>
+
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/netui/conf">
+ <fileset dir="${test.dir}/conf"/>
+ </copy>
+
+ <!-- Get testRecorder tests and config files for coreWeb-->
+ <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/coreWeb/config">
<fileset dir="${app.dir}/drt/testRecorder/config"
includes="*.xml"/>
</copy>
- <replace
dir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/config"
token="@DOMAIN_DIR@/drt" value="@DOMAIN_DIR@"/>
-
- <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder">
- <fileset dir="${build.dir}/tools/testRecorder"/>
- </copy>
-
- <copy todir="${test.dist.base.dir}/beehive-test-dist/netui/conf">
- <fileset dir="${test.dir}/conf"/>
- </copy>
+ <replace
dir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/coreWeb/config"
+ token="@DOMAIN_DIR@/drt/testRecorder/tests"
value="@DOMAIN_DIR@/testRecorder/coreWeb/tests"/>
- <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/tests">
+ <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/coreWeb/tests">
<fileset dir="${app.dir}/drt/testRecorder/tests"/>
</copy>
+
+ <!-- Get testRecorder tests and config files for jsfWeb-->
+ <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/jsfWeb/config">
+ <fileset dir="${app.dir}/jsf/testRecorder/config"
excludes="testRecorder-webapp-*.xml"/>
+ </copy>
+
+ <copy
file="${app.dir}/jsf/testRecorder/config/testRecorder-webapp-myfaces.xml"
+
tofile="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/jsfWeb/config/testRecorder-webapp.xml">
+ </copy>
+
+ <replace
dir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/jsfWeb/config"
+ token="@DOMAIN_DIR@/jsf/testRecorder/tests-myfaces"
value="@DOMAIN_DIR@/testRecorder/jsfWeb/tests"/>
+
+ <copy
todir="${test.dist.base.dir}/beehive-test-dist/netui/testRecorder/jsfWeb/tests">
+ <fileset dir="${app.dir}/jsf/testRecorder/tests-myfaces"/>
+ </copy>
+ <!-- Get the tldx for other purpose -->
<copy todir="${test.dist.base.dir}/beehive-test-dist/netui/tldx">
<fileset dir="${build.dir}/lib" includes="*.tldx"/>
</copy>
-
+
+ <!-- Get jsf resources -->
+ <copy todir="${test.dist.base.dir}/beehive-test-dist/netui/jsf">
+ <fileset dir="${netui.home}/external/jsf"/>
+ </copy>
+
+ <!-- Get Struts resources -->
+ <ant antfile="${netui.home}/ant/webappTemplate.xml"
target="deploy.struts" inheritAll="false">
+ <property name="struts.version" value="1.1"/>
+ <property name="webapp.dir"
value="${test.dist.base.dir}/beehive-test-dist/netui/struts/struts1.1"/>
+ </ant>
+ <ant antfile="${netui.home}/ant/webappTemplate.xml"
target="deploy.struts" inheritAll="false">
+ <property name="struts.version" value="1.2"/>
+ <property name="webapp.dir"
value="${test.dist.base.dir}/beehive-test-dist/netui/struts/struts1.2"/>
+ </ant>
</target>
<target name="usage" description="How to use this build file">
Modified: incubator/beehive/trunk/netui/test/webapps/drt/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/build.xml?rev=165226&r1=165225&r2=165226&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/build.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/drt/build.xml Thu Apr 28
16:13:25 2005
@@ -143,6 +143,8 @@
<property name="suite.name" value="bvt.struts11"/>
<property name="playback.webapps" value="${webapp.name}"/>
<property name="drt.mode" value="true"/>
+ <property name="formatter.type" value="xml"/>
+ <property name="formatter.usefile" value="true"/>
</ant>
</target>
Modified: incubator/beehive/trunk/netui/test/webapps/jsf/build.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/jsf/build.xml?rev=165226&r1=165225&r2=165226&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/jsf/build.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/jsf/build.xml Thu Apr 28
16:13:25 2005
@@ -133,6 +133,8 @@
<property name="playback.webapps" value="${webapp.name}"/>
<!-- Wait for the server's root url to see if the server has
started -->
<property name="waitfor.url" value="${server.root.url}"/>
+ <property name="formatter.type" value="xml"/>
+ <property name="formatter.usefile" value="true"/>
</ant>
</target>
@@ -144,6 +146,8 @@
<property name="playback.webapps" value="${webapp.name}"/>
<!-- Wait for the server's root url to see if the server has
started -->
<property name="waitfor.url" value="${server.root.url}"/>
+ <property name="formatter.type" value="xml"/>
+ <property name="formatter.usefile" value="true"/>
</ant>
</target>