]> source.dussan.org Git - vaadin-framework.git/commitdiff
Integration test fixes
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>
Mon, 23 Jan 2012 13:20:15 +0000 (13:20 +0000)
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>
Mon, 23 Jan 2012 13:20:15 +0000 (13:20 +0000)
svn changeset:22747/svn branch:6.8

tests/integration_base_files/cleanup.sh
tests/integration_tests.xml

index 44e2e5f6eed225de39c5c0d730f7b0771d210ab4..42fb5a434d5ca0133a1d9de8d97e35369cdfa210 100644 (file)
@@ -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/*
index 57d6bb47a9e244ddf336e8ddd388c170532ca277..0c62d560c3c909d2f226e059e3124abecf28b46b 100644 (file)
@@ -3,20 +3,20 @@
 <project name="Vaadin Integration Tests" basedir="." default="integration-test-all">\r
 \r
        <!-- Target deploying demo.war -->\r
-       <fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run"/>\r
-       \r
-       <fail unless="test.integration.user" message="test.integration.user must be set for integration tests to run"/>\r
-       <fail unless="test.integration.antfile" message="test.integration.antfile must be set for integration tests to run"/>\r
+       <fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run" />\r
+\r
+       <fail unless="test.integration.user" message="test.integration.user must be set for integration tests to run" />\r
+       <fail unless="test.integration.antfile" message="test.integration.antfile must be set for integration tests to run" />\r
 \r
        <!-- Test with these browsers -->\r
        <property name="test_browsers" value="winxp-firefox9" />\r
 \r
        <!-- Path to key file. Default value -->\r
        <property name="sshkey.file" value="id_dsa" />\r
-       \r
+\r
        <!-- path and name for demo.war to be deployed -->\r
-       <property name="demo.war" value="demo.war"/>\r
-       \r
+       <property name="demo.war" value="demo.war" />\r
+\r
        <!-- Host running Testbench RC or Testbench Hub. Default value -->\r
        <property name="com.vaadin.testbench.tester.host" value="127.0.0.1" />\r
 \r
        <property name="ant.hub" value="${test.integration.antfile}" />\r
        <property name="user" value="${test.integration.user}" />\r
        <property name="passphrase" value="" />\r
-       \r
+\r
        <!-- add ant contrib -->\r
        <taskdef resource="net/sf/antcontrib/antcontrib.properties">\r
                <classpath>\r
-                       <pathelement location="../build/lib/ant-contrib-1.0b3.jar"/>\r
+                       <pathelement location="../build/lib/ant-contrib-1.0b3.jar" />\r
                </classpath>\r
        </taskdef>\r
-       \r
+\r
        <!-- Upload war to deploy to ssh host -->\r
        <target name="integration-test-upload-demo">\r
                <scp file="${demo.war}" todir="${user}@${test.integration.server}:integration-tests/servers/demo.war" keyfile="${sshkey.file}" passphrase="${passphrase}" />\r
        </target>\r
-       \r
+\r
        <!-- Run basic integration test test -->\r
        <target name="integration-test-servlet">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-servlet.html" />\r
                        <property name="testfiles" value="${testfiles}" />\r
                        <property name="test-output-dir" value="../build/integration-test-output/${server-name}" />\r
                        <property name="retries" value="0" />\r
-                       \r
+\r
                        <fileset dir="." includes="test.xml" />\r
                </subant>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-theme">\r
                <subant target="run-tests" failonerror="false" antfile="test.xml">\r
                        <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />\r
                        <property name="server.start.succeeded" value="1" />\r
                        <property name="testfiles" value="${testfiles-theme}" />\r
                        <property name="test-output-dir" value="../build/integration-test-output/${server-name}" />\r
-               \r
+\r
                        <fileset dir="." includes="test.xml" />\r
                </subant>\r
        </target>\r
-       \r
+\r
        <!-- Run integration test on GAE -->\r
        <target name="integration-test-test-GAE">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="GoogleAppEngine/integration-test-GAE.html" />\r
                <pathconvert pathsep=" " property="test-GAE" refid="html-test-files" />\r
-               \r
+\r
                <subant target="run-tests" failonerror="false" antfile="test.xml">\r
                        <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />\r
                        <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
                        <property name="browsers" value="${test_browsers}" />\r
                        <property name="testfiles" value="${test-GAE}" />\r
                        <property name="test-output-dir" value="../build/integration-test-gae-output" />\r
-                       \r
+\r
                        <fileset dir="." includes="test.xml" />\r
                </subant>\r
        </target>\r
-               \r
+\r
        <target name="integration-test-deploy-to-GAE">\r
                <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} deploy-to-GAE" />\r
        </target>\r
-                       \r
-       \r
+\r
+\r
        <target name="integration-test-tomcat7">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="tomcat7" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-tomcat4">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="tomcat4" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-tomcat5">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="tomcat5" />\r
                </antcall>\r
-       </target>       \r
-       \r
+       </target>\r
+\r
        <target name="integration-test-tomcat6">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="tomcat6" />\r
                </antcall>\r
-       </target>       \r
-       \r
+       </target>\r
+\r
        <target name="integration-test-jetty5">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
                        <param name="target-server" value="jetty5" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-jetty6">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
                        <param name="target-server" value="jetty6" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-jetty7">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
                        <param name="target-server" value="jetty7" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
+       <target name="integration-test-jetty8">\r
+               <antcall target="run-generic-integration-test">\r
+                       <param name="target-server" value="jetty8" />\r
+               </antcall>\r
+       </target>\r
+\r
        <target name="integration-test-jboss3">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="jboss3" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-jboss4">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="jboss4" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-jboss5">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="jboss5" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-jboss6">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="jboss6" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-jboss7">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="jboss7" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-glassfish2">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="glassfish2" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-glassfish3">\r
                <antcall target="run-generic-integration-test">\r
-                       <param name="startDelay" value="300" />\r
+                       <param name="startDelay" value="10" />\r
                        <param name="target-server" value="glassfish3" />\r
                </antcall>\r
        </target>\r
-       \r
-       \r
+\r
+\r
        <target name="integration-test-liferay6">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6/integration-test-liferay-6.0.5.html" />\r
                <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
-               \r
+\r
                <fileset dir="integration-testscripts" id="html-theme-files" includes="Liferay-6/Liferay6-theme.html" />\r
                <pathconvert pathsep=" " property="testfiles-theme" refid="html-theme-files" />\r
-               \r
-               \r
+\r
+\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="target-server" value="liferay6" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-liferay5">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-5/integration-test-liferay-5.2.3-portlet2.html" />\r
                <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
-               \r
+\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="target-server" value="liferay5" />\r
                </antcall>\r
        </target>\r
        <target name="integration-test-liferay6ee">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6EE/integration-test-liferay-6ee.html" />\r
                <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
-               \r
+\r
                <fileset dir="integration-testscripts" id="html-theme-files" includes="Liferay-6EE/Liferay6EE-theme.html" />\r
                <pathconvert pathsep=" " property="testfiles-theme" refid="html-theme-files" />\r
-               \r
+\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="target-server" value="liferay6ee" />\r
-               </antcall>              \r
+               </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-gatein3">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="GateIn-3/integration-test-GateIn-3.1.0-portlet2.html" />\r
                <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="test_browsers" value="winxp-firefox36" />\r
                        <param name="target-server" value="gatein3" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-exo3">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="eXo-3/integration-test-eXo-3.0.3-portlet2.html" />\r
                <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="test_browsers" value="winxp-firefox36" />\r
                        <param name="target-server" value="exo3" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-weblogic9">\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="target-port" value="7001" />\r
                        <param name="target-server" value="weblogic9" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-weblogic10">\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="target-port" value="7001" />\r
                        <param name="target-server" value="weblogic10" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-weblogic12">\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="target-port" value="7001" />\r
                        <param name="target-server" value="weblogic12" />\r
                </antcall>\r
        </target>\r
-       \r
-       \r
+\r
+\r
        <target name="integration-test-weblogicPortal">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="weblogic-portal/integration-test-WebLogic-Portal-10.3.2-portlet2.html" />\r
                <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
                <antcall target="run-generic-integration-test">\r
+                       <param name="startDelay" value="600" />\r
                        <param name="target-port" value="7001" />\r
                        <param name="target-server" value="weblogicportal" />\r
                </antcall>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-GAE">\r
-               <antcall target="integration-test-deploy-to-GAE"/>\r
+               <antcall target="integration-test-deploy-to-GAE" />\r
                <antcall target="integration-test-test-GAE" />\r
        </target>\r
-                       \r
+\r
        <!-- Upload demo, clean error screenshots and test deployment on all servers -->\r
        <target name="integration-test-all">\r
-               \r
+\r
                <parallel>\r
                        <trycatch property="tried">\r
                                <try>\r
                                        <antcall target="integration-test-get-lock" />\r
                                        <echo message="Got lock" />\r
                                        <antcall target="integration-test-upload-demo" />\r
-       \r
+\r
                                        <antcall target="run-integration-test">\r
-                                               <param name="target-server" value="GAE"/>\r
+                                               <param name="target-server" value="GAE" />\r
                                        </antcall>\r
-                                       \r
+\r
                                        <antcall target="integration-test-clean" />\r
                                        <echo message="Getting lock" />\r
                                        <antcall target="integration-test-release-lock" />\r
                                        <echo message="Lock released" />\r
-                                       \r
+\r
                                </try>\r
                                <catch>\r
                                        <echo message="Uploading of demo.war failed. ${tried}" />\r
                                </catch>\r
                        </trycatch>\r
-                                                       \r
+\r
                        <antcall target="integration-test-liferay6" />\r
                        <antcall target="integration-test-liferay6ee" />\r
                        <antcall target="integration-test-exo3" />\r
                        <antcall target="integration-test-liferay5" />\r
                        <antcall target="integration-test-weblogic9" />\r
                        <antcall target="integration-test-weblogic10" />\r
-                       <!--<antcall target="integration-test-weblogic12" />-->\r
+                       <antcall target="integration-test-weblogic12" />\r
                        <antcall target="integration-test-gatein3" />\r
                        <antcall target="integration-test-glassfish2" />\r
                        <antcall target="integration-test-glassfish3" />\r
                        <antcall target="integration-test-jetty5" />\r
                        <antcall target="integration-test-jetty6" />\r
                        <antcall target="integration-test-jetty7" />\r
+                       <antcall target="integration-test-jetty8" />\r
                        <antcall target="integration-test-tomcat4" />\r
                        <antcall target="integration-test-tomcat5" />\r
                        <antcall target="integration-test-tomcat6" />\r
                        <antcall target="integration-test-tomcat7" />\r
-                       \r
+\r
                </parallel>\r
-               \r
+\r
        </target>\r
-       \r
+\r
        <target name="do-run-generic-test">\r
                <property name="target-host" value="${target-server}.devnet.vaadin.com" />\r
                <property name="target-port" value="8080" />\r
-               \r
+\r
                <if>\r
                        <isset property="startDelay" />\r
                        <then>\r
                                <math result="sleepTime" datatype="int">\r
                                        <op op="rint">\r
                                                <op op="*">\r
-                                                       <num value="${startDelay}"/>\r
-                                                       <op op="random"/>\r
+                                                       <num value="${startDelay}" />\r
+                                                       <op op="random" />\r
                                                </op>\r
                                        </op>\r
                                </math>\r
-                               <echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo>             \r
+                               <echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo>\r
                                <sleep seconds="${sleepTime}" />\r
                        </then>\r
                </if>\r
-               \r
-               <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" >\r
+\r
+               <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}">\r
                        <fileset dir="integration_base_files">\r
                                <include name="*" />\r
                        </fileset>\r
                </scp>\r
-               \r
+\r
                <!-- trycatch probably not needed any more as it just fails with the original message and doesn't do anything in the finally block -->\r
                <trycatch property="error_message">\r
                        <try>\r
                                </antcall>\r
 \r
                                <scp file="${demo.war}" todir="${user}@${target-host}:demo.war" keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}" />\r
-                               \r
+\r
                                <!-- timeout in 15 minutes -->\r
                                <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" />\r
                                <antcall target="echo-prefix">\r
                                        <param name="prefix" value="${target-server}: " />\r
                                        <param name="message" value="${start-output}" />\r
                                </antcall>\r
-                               \r
+\r
                                <fail message="${start-output}">\r
                                        <condition>\r
                                                <not>\r
                                        <param name="server-name" value="${target-server}" />\r
                                        <param name="deployment.url" value="http://${target-host}:${target-port}" />\r
                                </antcall>\r
-                               \r
+\r
                                <!-- Run theme tests in all browsers if there's a property with the test files -->\r
                                <if>\r
                                        <isset property="testfiles-theme" />\r
                                                </antcall>\r
                                        </then>\r
                                </if>\r
-                               \r
+\r
                                <!-- timeout in five minutes -->\r
-                               <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" />\r
+                               <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" />\r
                                <antcall target="echo-prefix">\r
                                        <param name="prefix" value="${target-server}: " />\r
                                        <param name="message" value="${stop-output}" />\r
                        </catch>\r
                </trycatch>\r
        </target>\r
-       \r
+\r
        <target name="echo-prefix">\r
                <propertyregex property="message-prefixed" input="${prefix}${message}" regexp="\n" replace="\0${prefix}" global="true" defaultValue="${prefix}${message}" />\r
                <echo message="${message-prefixed}" />\r
        </target>\r
-       \r
+\r
        <target name="run-generic-integration-test">\r
                <concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>\r
                <trycatch property="tried">\r
                        </catch>\r
                </trycatch>\r
                <concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>\r
-       </target>       \r
+       </target>\r
 \r
        <target name="teamcity-escape">\r
                <property name="returnTo" value="return" />\r
-               \r
+\r
                <!-- Should also perform other escaping (\u0085, \u2028 and \u2029) - see http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity -->\r
                <!-- Immutable properties -> needs to create a new one every time -->\r
                <propertyregex property="details-escaped1" input="${message}" regexp="['|\[\]]" replace="|\0" global="true" defaultValue="${message}" />\r
                <propertyregex property="details-escaped2" input="${details-escaped1}" regexp="\n" replace="|n" global="true" defaultValue="${details-escaped1}" />\r
                <propertyregex property="details-escaped3" input="${details-escaped2}" regexp="\r" replace="|r" global="true" defaultValue="${details-escaped2}" />\r
-               \r
+\r
                <property name="${returnTo}" value="${details-escaped3}" />\r
        </target>\r
-       \r
+\r
        <target name="run-integration-test">\r
                <concat>##teamcity[testStarted name='${target-server}' flowId='${target-server}']</concat>\r
                <trycatch property="tried">\r
                </trycatch>\r
                <concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>\r
        </target>\r
-       \r
+\r
        <target name="integration-test-get-lock">\r
                <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} get-lock" />\r
        </target>\r
-       \r
+\r
        <target name="integration-test-release-lock">\r
                <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} release-lock" />\r
        </target>\r
-               \r
+\r
        <!-- Remove demo.war -->\r
        <target name="integration-test-clean">\r
                <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} clean" />\r