diff options
author | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-01-23 13:20:15 +0000 |
---|---|---|
committer | Johannes Dahlström <johannes.dahlstrom@vaadin.com> | 2012-01-23 13:20:15 +0000 |
commit | 4f50c1b2c01728a5dd4e3efbcb157d7094eebbd5 (patch) | |
tree | af8c4f60b02d7a0ce7cb70879d7ce48bb3019c46 | |
parent | 0b8a57ad0a0b776c0c89aaf7fdc65e5f2c9ac726 (diff) | |
download | vaadin-framework-4f50c1b2c01728a5dd4e3efbcb157d7094eebbd5.tar.gz vaadin-framework-4f50c1b2c01728a5dd4e3efbcb157d7094eebbd5.zip |
Integration test fixes
svn changeset:22747/svn branch:6.8
-rw-r--r-- | tests/integration_base_files/cleanup.sh | 3 | ||||
-rw-r--r-- | tests/integration_tests.xml | 213 |
2 files changed, 114 insertions, 102 deletions
diff --git a/tests/integration_base_files/cleanup.sh b/tests/integration_base_files/cleanup.sh index 44e2e5f6ee..42fb5a434d 100644 --- a/tests/integration_base_files/cleanup.sh +++ b/tests/integration_base_files/cleanup.sh @@ -23,5 +23,4 @@ if [ -a /home/integration/demo.war ] fi echo Cleaning deploy dir -ant -f /home/integration/deploy.xml clean - +rm -rf /home/integration/deploy/* diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml index 57d6bb47a9..0c62d560c3 100644 --- a/tests/integration_tests.xml +++ b/tests/integration_tests.xml @@ -3,20 +3,20 @@ <project name="Vaadin Integration Tests" basedir="." default="integration-test-all">
<!-- Target deploying demo.war -->
- <fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run"/>
-
- <fail unless="test.integration.user" message="test.integration.user must be set for integration tests to run"/>
- <fail unless="test.integration.antfile" message="test.integration.antfile must be set for integration tests to run"/>
+ <fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run" />
+
+ <fail unless="test.integration.user" message="test.integration.user must be set for integration tests to run" />
+ <fail unless="test.integration.antfile" message="test.integration.antfile must be set for integration tests to run" />
<!-- Test with these browsers -->
<property name="test_browsers" value="winxp-firefox9" />
<!-- Path to key file. Default value -->
<property name="sshkey.file" value="id_dsa" />
-
+
<!-- path and name for demo.war to be deployed -->
- <property name="demo.war" value="demo.war"/>
-
+ <property name="demo.war" value="demo.war" />
+
<!-- Host running Testbench RC or Testbench Hub. Default value -->
<property name="com.vaadin.testbench.tester.host" value="127.0.0.1" />
@@ -27,19 +27,19 @@ <property name="ant.hub" value="${test.integration.antfile}" />
<property name="user" value="${test.integration.user}" />
<property name="passphrase" value="" />
-
+
<!-- add ant contrib -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
- <pathelement location="../build/lib/ant-contrib-1.0b3.jar"/>
+ <pathelement location="../build/lib/ant-contrib-1.0b3.jar" />
</classpath>
</taskdef>
-
+
<!-- Upload war to deploy to ssh host -->
<target name="integration-test-upload-demo">
<scp file="${demo.war}" todir="${user}@${test.integration.server}:integration-tests/servers/demo.war" keyfile="${sshkey.file}" passphrase="${passphrase}" />
</target>
-
+
<!-- Run basic integration test test -->
<target name="integration-test-servlet">
<fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-servlet.html" />
@@ -53,11 +53,11 @@ <property name="testfiles" value="${testfiles}" />
<property name="test-output-dir" value="../build/integration-test-output/${server-name}" />
<property name="retries" value="0" />
-
+
<fileset dir="." includes="test.xml" />
</subant>
</target>
-
+
<target name="integration-test-theme">
<subant target="run-tests" failonerror="false" antfile="test.xml">
<property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
@@ -66,16 +66,16 @@ <property name="server.start.succeeded" value="1" />
<property name="testfiles" value="${testfiles-theme}" />
<property name="test-output-dir" value="../build/integration-test-output/${server-name}" />
-
+
<fileset dir="." includes="test.xml" />
</subant>
</target>
-
+
<!-- Run integration test on GAE -->
<target name="integration-test-test-GAE">
<fileset dir="integration-testscripts" id="html-test-files" includes="GoogleAppEngine/integration-test-GAE.html" />
<pathconvert pathsep=" " property="test-GAE" refid="html-test-files" />
-
+
<subant target="run-tests" failonerror="false" antfile="test.xml">
<property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
<property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />
@@ -84,133 +84,138 @@ <property name="browsers" value="${test_browsers}" />
<property name="testfiles" value="${test-GAE}" />
<property name="test-output-dir" value="../build/integration-test-gae-output" />
-
+
<fileset dir="." includes="test.xml" />
</subant>
</target>
-
+
<target name="integration-test-deploy-to-GAE">
<sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} deploy-to-GAE" />
</target>
-
-
+
+
<target name="integration-test-tomcat7">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="tomcat7" />
</antcall>
</target>
-
+
<target name="integration-test-tomcat4">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="tomcat4" />
</antcall>
</target>
-
+
<target name="integration-test-tomcat5">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="tomcat5" />
</antcall>
- </target>
-
+ </target>
+
<target name="integration-test-tomcat6">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="tomcat6" />
</antcall>
- </target>
-
+ </target>
+
<target name="integration-test-jetty5">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
<param name="target-server" value="jetty5" />
</antcall>
</target>
-
+
<target name="integration-test-jetty6">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
<param name="target-server" value="jetty6" />
</antcall>
</target>
-
+
<target name="integration-test-jetty7">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
<param name="target-server" value="jetty7" />
</antcall>
</target>
-
+
+ <target name="integration-test-jetty8">
+ <antcall target="run-generic-integration-test">
+ <param name="target-server" value="jetty8" />
+ </antcall>
+ </target>
+
<target name="integration-test-jboss3">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="jboss3" />
</antcall>
</target>
-
+
<target name="integration-test-jboss4">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="jboss4" />
</antcall>
</target>
-
+
<target name="integration-test-jboss5">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="jboss5" />
</antcall>
</target>
-
+
<target name="integration-test-jboss6">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="jboss6" />
</antcall>
</target>
-
+
<target name="integration-test-jboss7">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="jboss7" />
</antcall>
</target>
-
+
<target name="integration-test-glassfish2">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="glassfish2" />
</antcall>
</target>
-
+
<target name="integration-test-glassfish3">
<antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
+ <param name="startDelay" value="10" />
<param name="target-server" value="glassfish3" />
</antcall>
</target>
-
-
+
+
<target name="integration-test-liferay6">
<fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6/integration-test-liferay-6.0.5.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
-
+
<fileset dir="integration-testscripts" id="html-theme-files" includes="Liferay-6/Liferay6-theme.html" />
<pathconvert pathsep=" " property="testfiles-theme" refid="html-theme-files" />
-
-
+
+
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="target-server" value="liferay6" />
</antcall>
</target>
-
+
<target name="integration-test-liferay5">
<fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-5/integration-test-liferay-5.2.3-portlet2.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
-
+
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="target-server" value="liferay5" />
</antcall>
</target>
@@ -218,72 +223,79 @@ <target name="integration-test-liferay6ee">
<fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6EE/integration-test-liferay-6ee.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
-
+
<fileset dir="integration-testscripts" id="html-theme-files" includes="Liferay-6EE/Liferay6EE-theme.html" />
<pathconvert pathsep=" " property="testfiles-theme" refid="html-theme-files" />
-
+
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="target-server" value="liferay6ee" />
- </antcall>
+ </antcall>
</target>
-
+
<target name="integration-test-gatein3">
<fileset dir="integration-testscripts" id="html-test-files" includes="GateIn-3/integration-test-GateIn-3.1.0-portlet2.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="test_browsers" value="winxp-firefox36" />
<param name="target-server" value="gatein3" />
</antcall>
</target>
-
+
<target name="integration-test-exo3">
<fileset dir="integration-testscripts" id="html-test-files" includes="eXo-3/integration-test-eXo-3.0.3-portlet2.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="test_browsers" value="winxp-firefox36" />
<param name="target-server" value="exo3" />
</antcall>
</target>
-
+
<target name="integration-test-weblogic9">
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="target-port" value="7001" />
<param name="target-server" value="weblogic9" />
</antcall>
</target>
-
+
<target name="integration-test-weblogic10">
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="target-port" value="7001" />
<param name="target-server" value="weblogic10" />
</antcall>
</target>
-
+
<target name="integration-test-weblogic12">
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="target-port" value="7001" />
<param name="target-server" value="weblogic12" />
</antcall>
</target>
-
-
+
+
<target name="integration-test-weblogicPortal">
<fileset dir="integration-testscripts" id="html-test-files" includes="weblogic-portal/integration-test-WebLogic-Portal-10.3.2-portlet2.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
<antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
<param name="target-port" value="7001" />
<param name="target-server" value="weblogicportal" />
</antcall>
</target>
-
+
<target name="integration-test-GAE">
- <antcall target="integration-test-deploy-to-GAE"/>
+ <antcall target="integration-test-deploy-to-GAE" />
<antcall target="integration-test-test-GAE" />
</target>
-
+
<!-- Upload demo, clean error screenshots and test deployment on all servers -->
<target name="integration-test-all">
-
+
<parallel>
<trycatch property="tried">
<try>
@@ -292,22 +304,22 @@ <antcall target="integration-test-get-lock" />
<echo message="Got lock" />
<antcall target="integration-test-upload-demo" />
-
+
<antcall target="run-integration-test">
- <param name="target-server" value="GAE"/>
+ <param name="target-server" value="GAE" />
</antcall>
-
+
<antcall target="integration-test-clean" />
<echo message="Getting lock" />
<antcall target="integration-test-release-lock" />
<echo message="Lock released" />
-
+
</try>
<catch>
<echo message="Uploading of demo.war failed. ${tried}" />
</catch>
</trycatch>
-
+
<antcall target="integration-test-liferay6" />
<antcall target="integration-test-liferay6ee" />
<antcall target="integration-test-exo3" />
@@ -315,7 +327,7 @@ <antcall target="integration-test-liferay5" />
<antcall target="integration-test-weblogic9" />
<antcall target="integration-test-weblogic10" />
- <!--<antcall target="integration-test-weblogic12" />-->
+ <antcall target="integration-test-weblogic12" />
<antcall target="integration-test-gatein3" />
<antcall target="integration-test-glassfish2" />
<antcall target="integration-test-glassfish3" />
@@ -327,41 +339,42 @@ <antcall target="integration-test-jetty5" />
<antcall target="integration-test-jetty6" />
<antcall target="integration-test-jetty7" />
+ <antcall target="integration-test-jetty8" />
<antcall target="integration-test-tomcat4" />
<antcall target="integration-test-tomcat5" />
<antcall target="integration-test-tomcat6" />
<antcall target="integration-test-tomcat7" />
-
+
</parallel>
-
+
</target>
-
+
<target name="do-run-generic-test">
<property name="target-host" value="${target-server}.devnet.vaadin.com" />
<property name="target-port" value="8080" />
-
+
<if>
<isset property="startDelay" />
<then>
<math result="sleepTime" datatype="int">
<op op="rint">
<op op="*">
- <num value="${startDelay}"/>
- <op op="random"/>
+ <num value="${startDelay}" />
+ <op op="random" />
</op>
</op>
</math>
- <echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo>
+ <echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo>
<sleep seconds="${sleepTime}" />
</then>
</if>
-
- <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" >
+
+ <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}">
<fileset dir="integration_base_files">
<include name="*" />
</fileset>
</scp>
-
+
<!-- trycatch probably not needed any more as it just fails with the original message and doesn't do anything in the finally block -->
<trycatch property="error_message">
<try>
@@ -373,14 +386,14 @@ </antcall>
<scp file="${demo.war}" todir="${user}@${target-host}:demo.war" keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" />
-
+
<!-- timeout in 15 minutes -->
<sshexec host="${target-host}" outputproperty="start-output" timeout="900000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml startup-and-deploy" failonerror="false" />
<antcall target="echo-prefix">
<param name="prefix" value="${target-server}: " />
<param name="message" value="${start-output}" />
</antcall>
-
+
<fail message="${start-output}">
<condition>
<not>
@@ -394,7 +407,7 @@ <param name="server-name" value="${target-server}" />
<param name="deployment.url" value="http://${target-host}:${target-port}" />
</antcall>
-
+
<!-- Run theme tests in all browsers if there's a property with the test files -->
<if>
<isset property="testfiles-theme" />
@@ -405,9 +418,9 @@ </antcall>
</then>
</if>
-
+
<!-- timeout in five minutes -->
- <sshexec host="${target-host}" outputproperty="stop-output" timeout="300000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml shutdown-and-cleanup" failonerror="false" />
+ <sshexec host="${target-host}" outputproperty="stop-output" timeout="600000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml shutdown-and-cleanup" failonerror="false" />
<antcall target="echo-prefix">
<param name="prefix" value="${target-server}: " />
<param name="message" value="${stop-output}" />
@@ -418,12 +431,12 @@ </catch>
</trycatch>
</target>
-
+
<target name="echo-prefix">
<propertyregex property="message-prefixed" input="${prefix}${message}" regexp="\n" replace="\0${prefix}" global="true" defaultValue="${prefix}${message}" />
<echo message="${message-prefixed}" />
</target>
-
+
<target name="run-generic-integration-test">
<concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>
<trycatch property="tried">
@@ -439,20 +452,20 @@ </catch>
</trycatch>
<concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>
- </target>
+ </target>
<target name="teamcity-escape">
<property name="returnTo" value="return" />
-
+
<!-- Should also perform other escaping (\u0085, \u2028 and \u2029) - see http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity -->
<!-- Immutable properties -> needs to create a new one every time -->
<propertyregex property="details-escaped1" input="${message}" regexp="['|\[\]]" replace="|\0" global="true" defaultValue="${message}" />
<propertyregex property="details-escaped2" input="${details-escaped1}" regexp="\n" replace="|n" global="true" defaultValue="${details-escaped1}" />
<propertyregex property="details-escaped3" input="${details-escaped2}" regexp="\r" replace="|r" global="true" defaultValue="${details-escaped2}" />
-
+
<property name="${returnTo}" value="${details-escaped3}" />
</target>
-
+
<target name="run-integration-test">
<concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>
<trycatch property="tried">
@@ -469,15 +482,15 @@ </trycatch>
<concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>
</target>
-
+
<target name="integration-test-get-lock">
<sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} get-lock" />
</target>
-
+
<target name="integration-test-release-lock">
<sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} release-lock" />
</target>
-
+
<!-- Remove demo.war -->
<target name="integration-test-clean">
<sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} clean" />
|