* integration-test/build.xml,

integration-test/project.properties:
  Use properties to determine the version number of the product to use.
  Added tests for Catalina 4.1, in addition to 5.
  Generate HTML reports of the test run.
This commit is contained in:
Francois Beausoleil 2004-03-24 18:35:06 +00:00
parent 1e4c234ea7
commit c0ff4bc552
2 changed files with 128 additions and 61 deletions

View File

@ -89,47 +89,72 @@
</target> </target>
<target name="tests-jetty" depends="buildtests" description="Runs Jetty integration tests"> <target name="tests-jetty" depends="buildtests" description="Runs Jetty integration tests">
<copy file="${config.dir}/jetty-4.2.18/jetty.xml" todir="${tmp.dir}/jetty-4.2.18/etc" overwrite="true"/> <copy file="${config.dir}/jetty-${jetty.version}/jetty.xml" todir="${tmp.dir}/jetty-${jetty.version}/etc" overwrite="true"/>
<copy file="${acegisecurity.xml}" todir="${tmp.dir}/jetty-4.2.18/etc" overwrite="true"/> <copy file="${acegisecurity.xml}" todir="${tmp.dir}/jetty-${jetty.version}/etc" overwrite="true"/>
<copy file="${dist.lib.dir}/acegi-security-jetty-ext.jar" todir="${tmp.dir}/jetty-4.2.18/ext" overwrite="true"/> <copy file="${dist.lib.dir}/acegi-security-jetty-ext.jar" todir="${tmp.dir}/jetty-${jetty.version}/ext" overwrite="true"/>
<copy file="${lib.dir}/aop-alliance/aopalliance.jar" todir="${tmp.dir}/jetty-4.2.18/ext" overwrite="true"/> <copy file="${lib.dir}/aop-alliance/aopalliance.jar" todir="${tmp.dir}/jetty-${jetty.version}/ext" overwrite="true"/>
<copy file="${lib.dir}/jakarta-commons/commons-logging.jar" todir="${tmp.dir}/jetty-4.2.18/ext" overwrite="true"/> <copy file="${lib.dir}/jakarta-commons/commons-logging.jar" todir="${tmp.dir}/jetty-${jetty.version}/ext" overwrite="true"/>
<copy file="${lib.dir}/spring/spring.jar" todir="${tmp.dir}/jetty-4.2.18/ext" overwrite="true"/> <copy file="${lib.dir}/spring/spring.jar" todir="${tmp.dir}/jetty-${jetty.version}/ext" overwrite="true"/>
<copy file="${contacts.war}" todir="${tmp.dir}/jetty-4.2.18/webapps" overwrite="true"/> <copy file="${contacts.war}" todir="${tmp.dir}/jetty-${jetty.version}/webapps" overwrite="true"/>
<parallel> <parallel>
<java fork="true" dir="${tmp.dir}/jetty-4.2.18/" classpath="${tmp.dir}/jetty-4.2.18/start.jar" classname="org.mortbay.start.Main"> <java fork="true" dir="${tmp.dir}/jetty-${jetty.version}/" classpath="${tmp.dir}/jetty-${jetty.version}/start.jar" classname="org.mortbay.start.Main">
</java> </java>
<sequential> <sequential>
<waitfor maxwait="60" maxwaitunit="second" checkevery="500" checkeveryunit="millisecond"> <waitfor maxwait="240" maxwaitunit="second" checkevery="500" checkeveryunit="millisecond">
<http url="http://localhost:8080/contacts" /> <http url="http://localhost:8080/contacts" />
</waitfor> </waitfor>
<delete dir="${reports.dir}/jetty-4.2.18"/> <delete dir="${reports.dir}/jetty-${jetty.version}"/>
<mkdir dir="${reports.dir}/jetty-4.2.18"/> <mkdir dir="${reports.dir}/jetty-${jetty.version}"/>
<junit printsummary="yes" haltonfailure="no"> <junit printsummary="yes" haltonfailure="no">
<classpath location="${build.dir}"/> <classpath location="${build.dir}"/>
<classpath refid="qa-portalpath"/> <classpath refid="qa-portalpath"/>
<formatter type="plain"/> <formatter type="xml"/>
<batchtest fork="yes" todir="${reports.dir}/jetty-4.2.18"> <batchtest fork="yes" todir="${reports.dir}/jetty-${jetty.version}">
<fileset dir="${build.dir}" includes="${test.includes}" excludes="${test.excludes}"/> <fileset dir="${build.dir}" includes="${test.includes}" excludes="${test.excludes}"/>
</batchtest> </batchtest>
</junit> </junit>
<java fork="true" dir="${tmp.dir}/jetty-4.2.18/" classpath="${tmp.dir}/jetty-4.2.18/stop.jar" classname="org.mortbay.stop.Main"/> <java fork="true" dir="${tmp.dir}/jetty-${jetty.version}/" classpath="${tmp.dir}/jetty-${jetty.version}/stop.jar" classname="org.mortbay.stop.Main"/>
</sequential> </sequential>
</parallel> </parallel>
<antcall target="-report">
<param name="product" value="jetty-${jetty.version}"/>
</antcall>
</target> </target>
<target name="tests-catalina" depends="buildtests" description="Runs Catalina integration tests"> <target name="tests-catalina" description="Runs Catalina integration tests">
<delete dir="${tmp.dir}/jakarta-tomcat-5.0.19/webapps/contacts"/> <antcall target="-tests-catalina">
<copy file="${config.dir}/catalina-5.0.19/server.xml" todir="${tmp.dir}/jakarta-tomcat-5.0.19/conf" overwrite="true"/> <param name="tomcat.version" value="${tomcat-4.1.version}"/>
<copy file="${acegisecurity.xml}" todir="${tmp.dir}/jakarta-tomcat-5.0.19/conf" overwrite="true"/> </antcall>
<copy file="${dist.lib.dir}/acegi-security-catalina-server.jar" todir="${tmp.dir}/jakarta-tomcat-5.0.19/server/lib" overwrite="true"/> <antcall target="-tests-catalina">
<copy file="${dist.lib.dir}/acegi-security-catalina-common.jar" todir="${tmp.dir}/jakarta-tomcat-5.0.19/common/lib" overwrite="true"/> <param name="tomcat.version" value="${tomcat-5.version}"/>
<copy file="${lib.dir}/aop-alliance/aopalliance.jar" todir="${tmp.dir}/jakarta-tomcat-5.0.19/common/lib" overwrite="true"/> </antcall>
<copy file="${lib.dir}/spring/spring.jar" todir="${tmp.dir}/jakarta-tomcat-5.0.19/common/lib" overwrite="true"/> </target>
<copy file="${contacts.war}" todir="${tmp.dir}/jakarta-tomcat-5.0.19/webapps" overwrite="true"/>
<property name="tomcat.home" value="${tmp.dir}/jakarta-tomcat-5.0.19"/> <target name="tests-catalina-4.1" description="Runs Catalina 4.1 integration tests">
<antcall target="-tests-catalina">
<param name="tomcat.version" value="${tomcat-4.1.version}"/>
</antcall>
</target>
<target name="tests-catalina-5" description="Runs Catalina 5 integration tests">
<antcall target="-tests-catalina">
<param name="tomcat.version" value="${tomcat-5.version}"/>
</antcall>
</target>
<target name="-tests-catalina" depends="buildtests" description="Runs Catalina integration tests">
<delete dir="${tmp.dir}/jakarta-tomcat-${tomcat.version}/webapps/contacts"/>
<copy file="${config.dir}/catalina-${tomcat.version}/server.xml" todir="${tmp.dir}/jakarta-tomcat-${tomcat.version}/conf" overwrite="true"/>
<copy file="${acegisecurity.xml}" todir="${tmp.dir}/jakarta-tomcat-${tomcat.version}/conf" overwrite="true"/>
<copy file="${dist.lib.dir}/acegi-security-catalina-server.jar" todir="${tmp.dir}/jakarta-tomcat-${tomcat.version}/server/lib" overwrite="true"/>
<copy file="${dist.lib.dir}/acegi-security-catalina-common.jar" todir="${tmp.dir}/jakarta-tomcat-${tomcat.version}/common/lib" overwrite="true"/>
<copy file="${lib.dir}/aop-alliance/aopalliance.jar" todir="${tmp.dir}/jakarta-tomcat-${tomcat.version}/common/lib" overwrite="true"/>
<copy file="${lib.dir}/spring/spring.jar" todir="${tmp.dir}/jakarta-tomcat-${tomcat.version}/common/lib" overwrite="true"/>
<copy file="${contacts.war}" todir="${tmp.dir}/jakarta-tomcat-${tomcat.version}/webapps" overwrite="true"/>
<property name="tomcat.home" value="${tmp.dir}/jakarta-tomcat-${tomcat.version}"/>
<parallel> <parallel>
<java fork="true" classname="org.apache.catalina.startup.Bootstrap" dir="${tomcat.home}"> <java fork="true" classname="org.apache.catalina.startup.Bootstrap" dir="${tomcat.home}">
<jvmarg value="-Dcatalina.home=${tomcat.home}"/> <jvmarg value="-Dcatalina.home=${tomcat.home}"/>
@ -142,16 +167,16 @@
</classpath> </classpath>
</java> </java>
<sequential> <sequential>
<waitfor maxwait="60" maxwaitunit="second" checkevery="500" checkeveryunit="millisecond"> <waitfor maxwait="240" maxwaitunit="second" checkevery="500" checkeveryunit="millisecond">
<http url="http://localhost:8080/contacts" /> <http url="http://localhost:8080/contacts" />
</waitfor> </waitfor>
<delete dir="${reports.dir}/jakarta-tomcat-5.0.19"/> <delete dir="${reports.dir}/jakarta-tomcat-${tomcat.version}"/>
<mkdir dir="${reports.dir}/jakarta-tomcat-5.0.19"/> <mkdir dir="${reports.dir}/jakarta-tomcat-${tomcat.version}"/>
<junit printsummary="yes" haltonfailure="no"> <junit printsummary="yes" haltonfailure="no">
<classpath location="${build.dir}"/> <classpath location="${build.dir}"/>
<classpath refid="qa-portalpath"/> <classpath refid="qa-portalpath"/>
<formatter type="plain"/> <formatter type="xml"/>
<batchtest fork="yes" todir="${reports.dir}/jakarta-tomcat-5.0.19"> <batchtest fork="yes" todir="${reports.dir}/jakarta-tomcat-${tomcat.version}">
<fileset dir="${build.dir}" includes="${test.includes}" excludes="${test.excludes}"/> <fileset dir="${build.dir}" includes="${test.includes}" excludes="${test.excludes}"/>
</batchtest> </batchtest>
</junit> </junit>
@ -167,65 +192,102 @@
</java> </java>
</sequential> </sequential>
</parallel> </parallel>
<antcall target="-report">
<param name="product" value="jakarta-tomcat-${tomcat.version}"/>
</antcall>
</target> </target>
<target name="tests-jboss" depends="buildtests" description="Runs JBoss integration tests"> <target name="tests-jboss" depends="buildtests" description="Runs JBoss integration tests">
<copy file="${config.dir}/jboss-3.2.3/login-config.xml" todir="${tmp.dir}/jboss-3.2.3/server/default/conf" overwrite="true"/> <copy file="${config.dir}/jboss-${jboss.version}/login-config.xml" todir="${tmp.dir}/jboss-${jboss.version}/server/default/conf" overwrite="true"/>
<copy file="${acegisecurity.xml}" todir="${tmp.dir}/jboss-3.2.3/server/default/conf" overwrite="true"/> <copy file="${acegisecurity.xml}" todir="${tmp.dir}/jboss-${jboss.version}/server/default/conf" overwrite="true"/>
<copy file="${dist.lib.dir}/acegi-security-jboss-lib.jar" todir="${tmp.dir}/jboss-3.2.3/server/default/lib" overwrite="true"/> <copy file="${dist.lib.dir}/acegi-security-jboss-lib.jar" todir="${tmp.dir}/jboss-${jboss.version}/server/default/lib" overwrite="true"/>
<copy file="${lib.dir}/aop-alliance/aopalliance.jar" todir="${tmp.dir}/jboss-3.2.3/server/default/lib" overwrite="true"/> <copy file="${lib.dir}/aop-alliance/aopalliance.jar" todir="${tmp.dir}/jboss-${jboss.version}/server/default/lib" overwrite="true"/>
<copy file="${lib.dir}/spring/spring.jar" todir="${tmp.dir}/jboss-3.2.3/server/default/lib" overwrite="true"/> <copy file="${lib.dir}/spring/spring.jar" todir="${tmp.dir}/jboss-${jboss.version}/server/default/lib" overwrite="true"/>
<copy file="${contacts.war}" todir="${tmp.dir}/jboss-3.2.3/server/default/deploy" overwrite="true"/> <copy file="${contacts.war}" todir="${tmp.dir}/jboss-${jboss.version}/server/default/deploy" overwrite="true"/>
<parallel> <parallel>
<java fork="yes" classname="org.jboss.Main" dir="${tmp.dir}/jboss-3.2.3"> <java fork="yes" classname="org.jboss.Main" dir="${tmp.dir}/jboss-${jboss.version}">
<classpath> <classpath>
<pathelement path="${java.home}/../lib/tools.jar"/> <pathelement path="${java.home}/../lib/tools.jar"/>
<pathelement path="${tmp.dir}/jboss-3.2.3/bin/run.jar"/> <pathelement path="${tmp.dir}/jboss-${jboss.version}/bin/run.jar"/>
</classpath> </classpath>
</java> </java>
<sequential> <sequential>
<waitfor maxwait="60" maxwaitunit="second" checkevery="500" checkeveryunit="millisecond"> <waitfor maxwait="240" maxwaitunit="second" checkevery="500" checkeveryunit="millisecond">
<http url="http://localhost:8080/contacts" /> <http url="http://localhost:8080/contacts" />
</waitfor> </waitfor>
<delete dir="${reports.dir}/jboss-3.2.3"/> <delete dir="${reports.dir}/jboss-${jboss.version}"/>
<mkdir dir="${reports.dir}/jboss-3.2.3"/> <mkdir dir="${reports.dir}/jboss-${jboss.version}"/>
<junit printsummary="yes" haltonfailure="no"> <junit printsummary="yes" haltonfailure="no">
<classpath location="${build.dir}"/> <classpath location="${build.dir}"/>
<classpath refid="qa-portalpath"/> <classpath refid="qa-portalpath"/>
<formatter type="plain"/> <formatter type="xml"/>
<batchtest fork="yes" todir="${reports.dir}/jboss-3.2.3"> <batchtest fork="yes" todir="${reports.dir}/jboss-${jboss.version}">
<fileset dir="${build.dir}" includes="${test.includes}" excludes="${test.excludes}"/> <fileset dir="${build.dir}" includes="${test.includes}" excludes="${test.excludes}"/>
</batchtest> </batchtest>
</junit> </junit>
<java fork="yes" classname="org.jboss.Shutdown" dir="${tmp.dir}/jboss-3.2.3"> <java fork="yes" classname="org.jboss.Shutdown" dir="${tmp.dir}/jboss-${jboss.version}">
<arg value="--shutdown"/> <arg value="--shutdown"/>
<classpath> <classpath>
<pathelement path="${tmp.dir}/jboss-3.2.3/bin/shutdown.jar"/> <pathelement path="${tmp.dir}/jboss-${jboss.version}/bin/shutdown.jar"/>
</classpath> </classpath>
</java> </java>
</sequential> </sequential>
</parallel> </parallel>
<antcall target="-report">
<param name="product" value="jboss-${jboss.version}"/>
</antcall>
</target> </target>
<target name="unzip" depends="unzip-jetty,unzip-catalina,unzip-jboss" description="Unzip all containers"/> <target name="unzip" depends="unzip-jetty,unzip-catalina,unzip-jboss" description="Unzip all containers"/>
<target name="unzip-jetty" depends="" description="Unzip Jetty container"> <target name="unzip-jetty" depends="" description="Unzip Jetty container">
<delete dir="${tmp.dir}/Jetty-4.2.18"/> <delete dir="${tmp.dir}/Jetty-${jetty.version}"/>
<mkdir dir="${tmp.dir}/Jetty-4.2.18"/> <mkdir dir="${tmp.dir}/Jetty-${jetty.version}"/>
<unzip src="${containers.dir}/Jetty-4.2.18-all.zip" dest="${tmp.dir}"/> <unzip src="${containers.dir}/Jetty-${jetty.version}-all.zip" dest="${tmp.dir}"/>
</target> </target>
<target name="unzip-catalina" depends="" description="Unzip Catalina container"> <target name="unzip-catalina" depends="" description="Unzip Catalina container">
<delete dir="${tmp.dir}/jakarta-tomcat-5.0.19"/> <antcall target="-unzip-catalina">
<mkdir dir="${tmp.dir}/jakarta-tomcat-5.0.19"/> <param name="tomcat.version" value="${tomcat-4.1.version}"/>
<unzip src="${containers.dir}/jakarta-tomcat-5.0.19.zip" dest="${tmp.dir}"/> </antcall>
<antcall target="-unzip-catalina">
<param name="tomcat.version" value="${tomcat-5.version}"/>
</antcall>
</target>
<target name="unzip-catalina-4.1" depends="" description="Unzip Catalina 4.1 container">
<antcall target="-unzip-catalina">
<param name="tomcat.version" value="${tomcat-4.1.version}"/>
</antcall>
</target>
<target name="unzip-catalina-5" depends="" description="Unzip Catalina 5 container">
<antcall target="-unzip-catalina">
<param name="tomcat.version" value="${tomcat-4.1.version}"/>
</antcall>
</target>
<target name="-unzip-catalina" depends="" description="Unzip Catalina container">
<delete dir="${tmp.dir}/jakarta-tomcat-${tomcat.version}"/>
<mkdir dir="${tmp.dir}/jakarta-tomcat-${tomcat.version}"/>
<unzip src="${containers.dir}/jakarta-tomcat-${tomcat.version}.zip" dest="${tmp.dir}"/>
</target> </target>
<target name="unzip-jboss" depends="" description="Unzip JBoss container"> <target name="unzip-jboss" depends="" description="Unzip JBoss container">
<delete dir="${tmp.dir}/jboss-3.2.3"/> <delete dir="${tmp.dir}/jboss-${jboss.version}"/>
<mkdir dir="${tmp.dir}/jboss-3.2.3"/> <mkdir dir="${tmp.dir}/jboss-${jboss.version}"/>
<unzip src="${containers.dir}/jboss-3.2.3.zip" dest="${tmp.dir}"/> <unzip src="${containers.dir}/jboss-${jboss.version}.zip" dest="${tmp.dir}"/>
</target>
<target name="-report" description="Generates a browsable HTML report of the test run">
<mkdir dir="${reports.dir}/${product}/html"/>
<junitreport todir="${reports.dir}/${product}">
<fileset dir="${reports.dir}/${product}" includes="**/TEST-*.xml"/>
<report format="frames" todir="${reports.dir}/${product}/html"/>
</junitreport>
</target> </target>
</project> </project>

View File

@ -25,3 +25,8 @@ reports.dir=reports
test.includes=**/*TestSuite.class **/*Tests.class test.includes=**/*TestSuite.class **/*Tests.class
test.excludes=**/Abstract* test.excludes=**/Abstract*
tomcat-4.1.version=4.1.30
tomcat-5.version=5.0.19
jetty.version=4.2.18
jboss.version=3.2.3