You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2005/07/25 23:14:24 UTC
svn commit: r225185 - in /incubator/beehive/trunk: netui/test/dist-test/
netui/test/dist-test/ant/ netui/test/webapps/urlTemplates/
netui/test/webapps/urlTemplates/testRecorder/config/ test/dist-test/ant/
Author: rich
Date: Mon Jul 25 14:14:07 2005
New Revision: 225185
URL: http://svn.apache.org/viewcvs?rev=225185&view=rev
Log:
This is a contribution from Carlin Rogers to address http://issues.apache.org/jira/browse/BEEHIVE-862 : Add URL Templates test to the test distribution .
BB: self (linux)
Modified:
incubator/beehive/trunk/netui/test/dist-test/ant/build.xml
incubator/beehive/trunk/netui/test/dist-test/build.xml
incubator/beehive/trunk/netui/test/webapps/urlTemplates/build.xml
incubator/beehive/trunk/netui/test/webapps/urlTemplates/testRecorder/config/testRecorder-tests.xml
incubator/beehive/trunk/test/dist-test/ant/testdist-buildWebapp.xml
Modified: incubator/beehive/trunk/netui/test/dist-test/ant/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/build.xml?rev=225185&r1=225184&r2=225185&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/build.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/build.xml Mon Jul 25 14:14:07 2005
@@ -33,6 +33,8 @@
<antcall target="dist.jsf.bvt.struts11">
<param name="prepare.notRequired" value="true"/>
</antcall>
+
+ <antcall target="dist.urltemplates.bvt"/>
</target>
<target name="dist.drt" description="Run the drt tests - coreWeb with struts12">
@@ -131,6 +133,24 @@
<param name="testRecorder.testResults.dir" value="${netui.testResults.dir}/jsfWeb/struts11/testRecorder"/>
</antcall>
</target>
+
+ <target name="dist.urltemplates.bvt" description="Run the urlTemplates bvt tests">
+ <antcall target="prepare.netui.testweb">
+ <param name="webapp.name" value="urlTemplates"/>
+ </antcall>
+ <antcall target="clean.testWeb">
+ <param name="webapp.name" value="urlTemplates"/>
+ </antcall>
+ <antcall target="build.testWeb">
+ <param name="struts.version" value="1.2"/>
+ <param name="webapp.name" value="urlTemplates"/>
+ </antcall>
+ <antcall target="testRecorder.bvt">
+ <param name="webapp.name" value="urlTemplates"/>
+ <param name="suite.name" value="bvt"/>
+ <param name="testRecorder.testResults.dir" value="${netui.testResults.dir}/urlTemplates/testRecorder"/>
+ </antcall>
+ </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=225185&r1=225184&r2=225185&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/build.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/build.xml Mon Jul 25 14:14:07 2005
@@ -25,6 +25,9 @@
<!-- Clean jsfWeb -->
<ant antfile="${app.dir}/jsf/build.xml" target="clean"/>
+ <!-- Clean urlTemplates -->
+ <ant antfile="${app.dir}/urlTemplates/build.xml" target="clean"/>
+
<!-- Moving files to the right place for packaging -->
<mkdir dir="${test.dist.base.dir}/beehive-test-dist"/>
<mkdir dir="${netui.test.dist.dir}"/>
@@ -47,6 +50,10 @@
<fileset dir="${app.dir}/jsf/jsfWeb"/>
</copy>
+ <copy todir="${netui.test.dist.dir}/webapps/urlTemplates">
+ <fileset dir="${app.dir}/urlTemplates/urlTemplates"/>
+ </copy>
+
<!-- Get Junit tests -->
<copy todir="${netui.test.dist.dir}/junit/junitTests">
<fileset dir="${test.classes.dir}/junitTests" excludes="build.xml"/>
@@ -94,6 +101,18 @@
<fileset dir="${netui.home}/external/jsf"/>
</copy>
+ <!-- Get testRecorder tests and config files for urlTemplates -->
+ <copy todir="${netui.test.dist.dir}/testRecorder/urlTemplates/config">
+ <fileset dir="${app.dir}/urlTemplates/testRecorder/config" includes="*.xml"/>
+ </copy>
+
+ <replace dir="${netui.test.dist.dir}/testRecorder/urlTemplates/config"
+ token="@DOMAIN_DIR@/urlTemplates/testRecorder/tests" value="@DOMAIN_DIR@/testRecorder/urlTemplates/tests"/>
+
+ <copy todir="${netui.test.dist.dir}/testRecorder/urlTemplates/tests">
+ <fileset dir="${app.dir}/urlTemplates/testRecorder/tests"/>
+ </copy>
+
<!-- Get Struts resources -->
<ant antfile="${netui.home}/ant/webappTemplate.xml" target="deploy.struts" inheritAll="false">
<property name="struts.version" value="1.1"/>
Modified: incubator/beehive/trunk/netui/test/webapps/urlTemplates/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/urlTemplates/build.xml?rev=225185&r1=225184&r2=225185&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/urlTemplates/build.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/urlTemplates/build.xml Mon Jul 25 14:14:07 2005
@@ -19,7 +19,7 @@
<!-- ================================================================ -->
<target name="build" description="Build webapp">
<echo message="--------------------------------------------------"/>
- <echo message="| NetUI urlTemplates DRT webapp build starting |"/>
+ <echo message="| NetUI urlTemplates BVT webapp build starting |"/>
<echo message="--------------------------------------------------"/>
<antcall target="update.runtime"/>
@@ -33,13 +33,14 @@
</copy>
<echo message="--------------------------------------------------"/>
- <echo message="| NetUI urlTemplates DRT webapp build ending |"/>
+ <echo message="| NetUI urlTemplates BVT webapp build ending |"/>
<echo message="--------------------------------------------------"/>
</target>
<target name="update.runtime" description="Update the NetUI runtime in the webapp without building the resources">
- <!-- the default version of Struts for the DRTs. To override, pass -Dstruts.version=1.1 on the command line -->
+ <!-- the default version of Struts for the BVTs. To override, pass -Dstruts.version=1.1 on the command line -->
<property name="struts.version" value="1.2"/>
+
<echo>struts.version: ${struts.version}</echo>
<ant antfile="${test.dir}/ant/buildWebapp.xml" target="deploy.netui" inheritAll="false">
@@ -55,7 +56,7 @@
<target name="clean" description="Clean webapp">
<echo message="--------------------------------------------------"/>
- <echo message="| NetUI urlTemplates DRT webapp clean starting |"/>
+ <echo message="| NetUI urlTemplates BVT webapp clean starting |"/>
<echo message="--------------------------------------------------"/>
<ant antfile="${test.dir}/ant/buildWebapp.xml" target="undeploy.netui" inheritAll="false">
@@ -66,11 +67,11 @@
<clean-webapp webappDir="${webapp.dir}"/>
<delete failOnError="false">
- <fileset dir="${app.dir}/drt/${webapp.name}/WEB-INF/lib" includes="**/*.jar"/>
+ <fileset dir="${app.dir}/urlTemplates/${webapp.name}/WEB-INF/lib" includes="**/*.jar"/>
</delete>
<echo message="--------------------------------------------------"/>
- <echo message="| NetUI urlTemplates DRT webapp clean ending |"/>
+ <echo message="| NetUI urlTemplates BVT webapp clean ending |"/>
<echo message="--------------------------------------------------"/>
</target>
@@ -85,23 +86,24 @@
</ant>
</target>
- <target name="drt.running" description="Playback the 'drt' category to a running server">
+ <target name="bvt.running" description="Playback the 'bvt' category to a running server">
<ant antfile="${test.dir}/ant/testRecorder.xml" target="suite.callback" inheritAll="false">
- <property name="suite.name" value="drt"/>
+ <property name="suite.name" value="bvt"/>
<property name="playback.webapps" value="${webapp.name}"/>
<property name="waitfor.url" value="${webapp.waitfor.url}"/>
</ant>
</target>
- <target name="drt" description="Run the drt suite with full server start / stop support." depends="clean,build">
+ <target name="bvt" description="Run the bvt suite with full server start / stop support." depends="clean,build">
<ant dir="${test.dir}" antfile="${test.dir}/ant/testRecorder.xml" inheritAll="false" target="server.test">
<property name="app.build.file" location="${app.dir}/urlTemplates/build.xml"/>
<property name="waitfor.url" value="${server.root.url}"/>
- <property name="suite.name" value="drt"/>
+ <property name="suite.name" value="bvt"/>
<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>
- <delete file="${webapp.dir}/WEB-INF/netui-config.xml"/>
</target>
<!-- ================================================================ -->
@@ -126,16 +128,57 @@
<!-- Targets for starting / stopping a server -->
<!-- -->
<!-- ================================================================ -->
- <target name="start" description="Start server with asserts enabled for org.apache.beehive.netui">
+ <target name="start" description="Start server">
<start-server shmem="false" javaOptions="-ea:org.apache.beehive.netui..."/>
</target>
+ <target name="start.without.asserts" description="Start server without assertions enabled">
+ <start-server shmem="false" javaOptions=""/>
+ </target>
+
+ <target name="start.with.shmem" description="Start server with shared memory debugging enabled">
+ <start-server shmem="true" javaOptions="-ea:org.apache.beehive.netui..."/>
+ </target>
+
<target name="stop" description="Stop server">
<stop-server/>
</target>
- <target name="ensure.deployed" description="Deploy webapp">
- <echo>ensure.deployed is NYI</echo>
+ <!-- todo: this needs to compost down into buildWebapp.xml; until we're sure it works, it stays here -->
+ <target name="ensure.deployed" description="Deploy webapp for the test recorder">
+ <echo>Ensuring that the webapp ${webapp.name} is deployed on a running server at the url ${webapp.waitfor.url}</echo>
+
+ <waitfor maxwait="5" maxwaitunit="second" timeoutproperty="unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ <antcall target="do.deploy"/>
+ <antcall target="do.redeploy"/>
+ <fail if="still.unavailable" message="Couldn't find webapp with path ${webapp.waitfor.url}"/>
+ </target>
+
+ <target name="do.deploy" if="unavailable">
+ <echo>Webapp is not deployed; deploying</echo>
+
+ <antcall target="deploy"/>
+ <echo>...deploy complete</echo>
+
+ <waitfor maxwait="120" maxwaitunit="second" timeoutproperty="still.unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
+ </target>
+
+ <target name="do.redeploy" unless="unavailable">
+ <echo>Webapp is deployed; undeploy and redeploy</echo>
+
+ <antcall target="undeploy"/>
+ <echo>...undeploy complete</echo>
+
+ <antcall target="deploy"/>
+ <echo>...deploy complete</echo>
+
+ <waitfor maxwait="120" maxwaitunit="second" timeoutproperty="still.unavailable">
+ <http url="${webapp.waitfor.url}"/>
+ </waitfor>
</target>
<target name="usage">
Modified: incubator/beehive/trunk/netui/test/webapps/urlTemplates/testRecorder/config/testRecorder-tests.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/urlTemplates/testRecorder/config/testRecorder-tests.xml?rev=225185&r1=225184&r2=225185&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/urlTemplates/testRecorder/config/testRecorder-tests.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/urlTemplates/testRecorder/config/testRecorder-tests.xml Mon Jul 25 14:14:07 2005
@@ -3,7 +3,11 @@
<categories>
<category>
<name>drt</name>
- <description>urlTemplates drt</description>
+ <description>drt</description>
+ </category>
+ <category>
+ <name>bvt</name>
+ <description>bvt</description>
</category>
</categories>
<tests>
@@ -12,7 +16,7 @@
<description>Test URL templates using /WEB-INF/url-template-config.xml</description>
<webapp>urlTemplates</webapp>
<categories>
- <category>drt</category>
+ <category>bvt</category>
</categories>
</test>
</tests>
Modified: incubator/beehive/trunk/test/dist-test/ant/testdist-buildWebapp.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/test/dist-test/ant/testdist-buildWebapp.xml?rev=225185&r1=225184&r2=225185&view=diff
==============================================================================
--- incubator/beehive/trunk/test/dist-test/ant/testdist-buildWebapp.xml (original)
+++ incubator/beehive/trunk/test/dist-test/ant/testdist-buildWebapp.xml Mon Jul 25 14:14:07 2005
@@ -57,6 +57,13 @@
<!-- compile JPFs -->
<build-pageflows srcdir="${webapp.dir}" tempdir="${webapp.dir}/WEB-INF/${tmp.sourcegen.dir}" classpathref="webapp.build.classpath"/>
+ <!-- copy META-INF reference to a Test ServletContainerAdapter
+ such as /WEB-INF/src/test/TestServletContainerAdapter.java
+ -->
+ <copy todir="${webapp.dir}/WEB-INF/classes">
+ <fileset dir="${webapp.dir}/WEB-INF/src" includes="META-INF/**"/>
+ </copy>
+
<!-- copy resources -->
<echo>Copy all .properties and .xml files</echo>
<copy todir="${webapp.dir}/WEB-INF/classes">