summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-05-30 17:06:30 +0300
committerVaadin Code Review <review@vaadin.com>2013-05-30 15:08:00 +0000
commit9a3dc4e99c7a417778342db83cd6e7c05558e5fb (patch)
tree4a77e0b93e48c9f2fec4839ffae76c3334ec337b /uitest
parentd850db60f9f7e144307bcf525d96665d1be64fc8 (diff)
downloadvaadin-framework-9a3dc4e99c7a417778342db83cd6e7c05558e5fb.tar.gz
vaadin-framework-9a3dc4e99c7a417778342db83cd6e7c05558e5fb.zip
Formatted XML files using defined rules (#11956)
Change-Id: Iecd621321fdde29d2d89d910ba46e9dadee58995
Diffstat (limited to 'uitest')
-rw-r--r--uitest/build.xml301
-rw-r--r--uitest/integration_base_files/base.xml253
-rw-r--r--uitest/integration_tests.xml1169
-rw-r--r--uitest/ivy.xml10
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml15
-rw-r--r--uitest/test.xml412
-rw-r--r--uitest/vaadin-server.xml58
7 files changed, 1186 insertions, 1032 deletions
diff --git a/uitest/build.xml b/uitest/build.xml
index 453fc26ea5..dc9258a807 100644
--- a/uitest/build.xml
+++ b/uitest/build.xml
@@ -1,148 +1,161 @@
<?xml version="1.0"?>
-<project name="vaadin-uitest" basedir="." default="publish-local" xmlns:ivy="antlib:org.apache.ivy.ant">
- <description>
- Provides a uitest WAR containing Vaadin UI tests
- </description>
- <include file="../common.xml" as="common" />
- <include file="../build.xml" as="vaadin" />
-
- <!-- global properties -->
- <property name="module.name" value="vaadin-uitest" />
- <property name="result.dir" value="result" />
- <property name="result.war" location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />
-
- <path id="classpath.compile.custom">
- </path>
-
- <target name="dependencies">
- <!-- This is copied from common.xml to be able to add server.test.source to the source path -->
-
- <ivy:resolve resolveid="common" conf="build, build-provided" />
- <ivy:cachepath pathid="classpath.compile.dependencies" conf="build, build-provided" />
- </target>
-
- <target name="compile" description="Compiles the module" depends="dependencies">
-
- <fail unless="module.name" message="No module name given" />
- <property name="result.dir" location="result" />
- <property name="src" location="${result.dir}/../src" />
- <property name="classes" location="${result.dir}/classes" />
- <property name="server.test.sources" location="${result.dir}/../../server/tests/src" />
- <mkdir dir="${classes}" />
-
- <!-- TODO: Get rid of this -->
- <javac destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
- <src path="${server.test.sources}" />
- <include name="com/vaadin/tests/data/bean/**" />
- <include name="com/vaadin/tests/VaadinClasses.java" />
- <include name="com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java" />
- <classpath refid="classpath.compile.dependencies" />
- <classpath refid="classpath.compile.custom" />
- </javac>
-
- <javac destdir="${classes}" source="${vaadin.java.version}" target="${vaadin.java.version}" debug="true" encoding="UTF-8" includeantruntime="false">
- <src path="${src}" />
- <classpath location="${classes}" />
- <classpath refid="classpath.compile.dependencies" />
- <classpath refid="classpath.compile.custom" />
- </javac>
- </target>
-
- <target name="testing-widgetset" depends="dependencies,compile">
- <property name="module" value="com.vaadin.tests.widgetset.TestingWidgetSet" />
- <property name="style" value="OBF" />
- <property name="localWorkers" value="2" />
- <property name="extraParams" value="" />
- <property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
- <property name="work.dir" location="${result.dir}/work" />
-
- <mkdir dir="${module.output.dir}" />
-
- <echo>Compiling ${module} to ${module.output.dir}</echo>
-
- <!-- compile the module -->
- <java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.dependencies" failonerror="yes" fork="yes" maxmemory="512m">
- <classpath location="src" />
- <classpath location="${classes}" />
- <arg value="-workDir" />
- <arg value="${work.dir}" />
- <arg value="-logLevel" />
- <arg value="TRACE" />
- <arg value="-war" />
- <arg value="${module.output.dir}" />
- <arg value="-style" />
- <arg value="${style}" />
-
- <arg value="-localWorkers" />
- <arg value="${localWorkers}" />
- <arg value="-strict" />
- <arg line="${extraParams}" />
- <arg value="${module}" />
-
- <sysproperty key="vFailIfNotSerializable" value="true" />
-
- <jvmarg value="-Xss8M" />
- <jvmarg value="-XX:MaxPermSize=256M" />
- <jvmarg value="-Djava.awt.headless=true" />
- </java>
-
- </target>
-
- <target name="war" depends="dependencies, compile, testing-widgetset">
- <property name="result.dir" location="result" />
- <property name="classes" location="${result.dir}/classes" />
- <property name="WebContent.dir" location="${vaadin.basedir}/WebContent" />
- <property name="deps.dir" location="${result.dir}/deps" />
- <property name="src" location="${result.dir}/../src" />
-
- <ivy:resolve resolveid="common" conf="build" />
- <ivy:cachepath pathid="classpath.runtime.dependencies" conf="build" />
-
- <delete dir="${deps.dir}" />
- <mkdir dir="${deps.dir}" />
-
- <copy todir="${deps.dir}" flatten="true">
- <path refid="classpath.runtime.dependencies" />
- </copy>
-
-
- <!-- Ensure filtered webcontent files are available -->
- <antcall target="common.filter.webcontent" />
-
- <war destfile="${result.war}" duplicate="fail" index="true">
- <fileset refid="common.files.for.all.jars" />
- <fileset dir="${result.dir}">
- <include name="VAADIN/widgetsets/**/*"/>
- </fileset>
- <fileset dir="${WebContent.dir}">
- <include name="statictestfiles/**" />
- <include name="VAADIN/themes/tests-*/**" />
- <include name="VAADIN/themes/reindeer-tests/**" />
- <include name="WEB-INF/*.xml" />
- </fileset>
- <classes dir="${classes}" />
- <classes dir="${src}" />
- <lib dir="${deps.dir}" />
- </war>
-
- </target>
-
- <target name="publish-local" depends="war">
- <antcall target="common.publish-local">
- <param name="conf" value="build" />
- </antcall>
- </target>
-
- <target name="clean">
- <antcall target="common.clean" />
- </target>
- <target name="checkstyle">
- <echo>Checkstyle is disabled for uitest for now</echo>
- </target>
- <target name="test" depends="checkstyle">
- <!--<antcall target="common.test.run" />-->
- <echo>WHAT? No JUnit tests for ${module.name}!</echo>
- </target>
+<project name="vaadin-uitest" basedir="." default="publish-local"
+ xmlns:ivy="antlib:org.apache.ivy.ant">
+ <description>
+ Provides a uitest WAR containing Vaadin UI tests
+ </description>
+ <include file="../common.xml" as="common" />
+ <include file="../build.xml" as="vaadin" />
+
+ <!-- global properties -->
+ <property name="module.name" value="vaadin-uitest" />
+ <property name="result.dir" value="result" />
+ <property name="result.war"
+ location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />
+
+ <path id="classpath.compile.custom">
+ </path>
+
+ <target name="dependencies">
+ <!-- This is copied from common.xml to be able to add server.test.source
+ to the source path -->
+
+ <ivy:resolve resolveid="common" conf="build, build-provided" />
+ <ivy:cachepath pathid="classpath.compile.dependencies"
+ conf="build, build-provided" />
+ </target>
+
+ <target name="compile" description="Compiles the module"
+ depends="dependencies">
+
+ <fail unless="module.name" message="No module name given" />
+ <property name="result.dir" location="result" />
+ <property name="src" location="${result.dir}/../src" />
+ <property name="classes" location="${result.dir}/classes" />
+ <property name="server.test.sources" location="${result.dir}/../../server/tests/src" />
+ <mkdir dir="${classes}" />
+
+ <!-- TODO: Get rid of this -->
+ <javac destdir="${classes}" source="${vaadin.java.version}"
+ target="${vaadin.java.version}" debug="true" encoding="UTF-8"
+ includeantruntime="false">
+ <src path="${server.test.sources}" />
+ <include name="com/vaadin/tests/data/bean/**" />
+ <include name="com/vaadin/tests/VaadinClasses.java" />
+ <include
+ name="com/vaadin/data/util/sqlcontainer/SQLTestsConstants.java" />
+ <classpath refid="classpath.compile.dependencies" />
+ <classpath refid="classpath.compile.custom" />
+ </javac>
+
+ <javac destdir="${classes}" source="${vaadin.java.version}"
+ target="${vaadin.java.version}" debug="true" encoding="UTF-8"
+ includeantruntime="false">
+ <src path="${src}" />
+ <classpath location="${classes}" />
+ <classpath refid="classpath.compile.dependencies" />
+ <classpath refid="classpath.compile.custom" />
+ </javac>
+ </target>
+
+ <target name="testing-widgetset" depends="dependencies,compile">
+ <property name="module"
+ value="com.vaadin.tests.widgetset.TestingWidgetSet" />
+ <property name="style" value="OBF" />
+ <property name="localWorkers" value="2" />
+ <property name="extraParams" value="" />
+ <property name="module.output.dir" location="${result.dir}/VAADIN/widgetsets" />
+ <property name="work.dir" location="${result.dir}/work" />
+
+ <mkdir dir="${module.output.dir}" />
+
+ <echo>Compiling ${module} to ${module.output.dir}</echo>
+
+ <!-- compile the module -->
+ <java classname="com.google.gwt.dev.Compiler" classpathref="classpath.compile.dependencies"
+ failonerror="yes" fork="yes" maxmemory="512m">
+ <classpath location="src" />
+ <classpath location="${classes}" />
+ <arg value="-workDir" />
+ <arg value="${work.dir}" />
+ <arg value="-logLevel" />
+ <arg value="TRACE" />
+ <arg value="-war" />
+ <arg value="${module.output.dir}" />
+ <arg value="-style" />
+ <arg value="${style}" />
+
+ <arg value="-localWorkers" />
+ <arg value="${localWorkers}" />
+ <arg value="-strict" />
+ <arg line="${extraParams}" />
+ <arg value="${module}" />
+
+ <sysproperty key="vFailIfNotSerializable" value="true" />
+
+ <jvmarg value="-Xss8M" />
+ <jvmarg value="-XX:MaxPermSize=256M" />
+ <jvmarg value="-Djava.awt.headless=true" />
+ </java>
+
+ </target>
+
+ <target name="war" depends="dependencies, compile, testing-widgetset">
+ <property name="result.dir" location="result" />
+ <property name="classes" location="${result.dir}/classes" />
+ <property name="WebContent.dir" location="${vaadin.basedir}/WebContent" />
+ <property name="deps.dir" location="${result.dir}/deps" />
+ <property name="src" location="${result.dir}/../src" />
+
+ <ivy:resolve resolveid="common" conf="build" />
+ <ivy:cachepath pathid="classpath.runtime.dependencies"
+ conf="build" />
+
+ <delete dir="${deps.dir}" />
+ <mkdir dir="${deps.dir}" />
+
+ <copy todir="${deps.dir}" flatten="true">
+ <path refid="classpath.runtime.dependencies" />
+ </copy>
+
+
+ <!-- Ensure filtered webcontent files are available -->
+ <antcall target="common.filter.webcontent" />
+
+ <war destfile="${result.war}" duplicate="fail" index="true">
+ <fileset refid="common.files.for.all.jars" />
+ <fileset dir="${result.dir}">
+ <include name="VAADIN/widgetsets/**/*" />
+ </fileset>
+ <fileset dir="${WebContent.dir}">
+ <include name="statictestfiles/**" />
+ <include name="VAADIN/themes/tests-*/**" />
+ <include name="VAADIN/themes/reindeer-tests/**" />
+ <include name="WEB-INF/*.xml" />
+ </fileset>
+ <classes dir="${classes}" />
+ <classes dir="${src}" />
+ <lib dir="${deps.dir}" />
+ </war>
+
+ </target>
+
+ <target name="publish-local" depends="war">
+ <antcall target="common.publish-local">
+ <param name="conf" value="build" />
+ </antcall>
+ </target>
+
+ <target name="clean">
+ <antcall target="common.clean" />
+ </target>
+ <target name="checkstyle">
+ <echo>Checkstyle is disabled for uitest for now</echo>
+ </target>
+ <target name="test" depends="checkstyle">
+ <!--<antcall target="common.test.run" /> -->
+ <echo>WHAT? No JUnit tests for ${module.name}!</echo>
+ </target>
</project> \ No newline at end of file
diff --git a/uitest/integration_base_files/base.xml b/uitest/integration_base_files/base.xml
index 5196aecfa9..d8ba018b75 100644
--- a/uitest/integration_base_files/base.xml
+++ b/uitest/integration_base_files/base.xml
@@ -1,138 +1,143 @@
<?xml version="1.0"?>
<project name="test" basedir=".">
- <property file="deploy.properties" />
+ <property file="deploy.properties" />
<property name="lock" value="deploy/lock.file" />
<property name="deployDir" value="deploy/${server}" />
<property name="serverPort" value="8080" />
<property name="war" value="demo.war" />
<property name="startupSpawn" value="false" />
<property name="JAVA_HOME" value="/usr/lib/jvm/default-java" />
- <property name="waitMinutes" value="3" />
- <property name="waitUrl" value="http://localhost:${serverPort}/demo/VAADIN/themes/reindeer/styles.css" />
- <property name="shutdownWait" value="10" />
+ <property name="waitMinutes" value="3" />
+ <property name="waitUrl"
+ value="http://localhost:${serverPort}/demo/VAADIN/themes/reindeer/styles.css" />
+ <property name="shutdownWait" value="10" />
+
-
<target name="afterDeploy">
- <!-- Empty default -->
+ <!-- Empty default -->
</target>
-
+
<target name="beforeDeploy">
- <!-- Empty default -->
+ <!-- Empty default -->
+ </target>
+
+ <target name="deploy">
+ <antcall target="beforeDeploy" />
+ <echo
+ message="${server}: Deploying ${war} to ${deployDir}/${autodeployDir}" />
+ <copy file="${war}" todir="${deployDir}/${autodeployDir}" />
+ <antcall target="afterDeploy" />
+ </target>
+
+ <target name="deployStatic">
+ <unzip src="${war}" dest="${staticDeployDir}/tmp-unpack-jar/">
+ <patternset>
+ <include name="WEB-INF/lib/*.jar" />
+ </patternset>
+ </unzip>
+ <unzip dest="${staticDeployDir}">
+ <fileset dir="${staticDeployDir}/tmp-unpack-jar/WEB-INF/lib"
+ includes="*.jar" />
+
+ <patternset>
+ <include name="VAADIN/**" />
+ </patternset>
+ </unzip>
+ <delete dir="${staticDeployDir}/tmp-unpack-jar/" />
+
+ <unzip src="${war}" dest="${staticDeployDir}">
+ <patternset>
+ <include name="VAADIN/**" />
+ </patternset>
+ </unzip>
+ </target>
+
+ <target name="unpack-server">
+ <echo message="${server}: Unpacking ${server}.tar.gz" />
+ <delete dir="${server}" />
+ <exec executable="tar">
+ <arg value="-xf" />
+ <arg value="${server}.tar.gz" />
+ </exec>
+ <move file="${server}" tofile="${deployDir}" />
+ <echo message="Done." />
+ </target>
+
+ <target name="doStartup">
+ <exec executable="./run.sh" spawn="${startupSpawn}">
+ <env key="JAVA_HOME" value="${JAVA_HOME}" />
+ </exec>
+ </target>
+
+ <target name="startup">
+ <antcall target="doStartup" />
+ <echo message="${server}: Waiting for ${waitUrl} to become available." />
+ <waitfor maxwait="${waitMinutes}" maxwaitunit="minute"
+ checkevery="10000" timeoutproperty="timeout">
+ <http url="${waitUrl}" />
+ </waitfor>
+ <!-- Print load averages to get an indicator on whether the server
+ still attempts to start up -->
+ <exec executable="uptime" />
+ <fail if="timeout" message="${server} failed to deploy" />
+
+ <echo message="${server}: Demo deployed successfully." />
+ </target>
+
+ <target name="shutdown">
+ <exec executable="./stop.sh">
+ <env key="JAVA_HOME" value="${JAVA_HOME}" />
+ </exec>
+ <sleep seconds="${shutdownWait}" />
+ </target>
+
+ <target name="force-shutdown">
+ <exec executable="./cleanup.sh" />
+ </target>
+
+ <target name="check-port">
+ <fail
+ message="${server}: Something is still listening on port ${serverPort}">
+ <condition>
+ <socket server="localhost" port="${serverPort}" />
+ </condition>
+ </fail>
+ </target>
+
+ <target name="check-lock">
+ <available file="${lock}" property="lockAvailable" />
+ <fail unless="lockAvailable" message="Instance is not locked!" />
+ </target>
+
+ <target name="get-lock">
+ <mkdir dir="deploy" />
+ <echo>${server}: Getting the lock</echo>
+ <exec executable="lockfile" failonerror="true">
+ <!-- Check every 10 seconds -->
+ <arg value="-10" />
+ <!-- Retry for 55 minutes (build server gives up after 60 minutes) -->
+ <arg value="-r330" />
+ <arg value="${lock}" />
+ </exec>
+ <echo>${server}: Got the lock</echo>
+ </target>
+
+ <target name="clean">
+ <delete dir="${deployDir}" failonerror="false" />
+ </target>
+
+ <target name="release-lock">
+ <!-- <exec executable="rm"> <arg value="-f" /> <arg value="${lock}"
+ /> </exec> -->
+ <delete>
+ <fileset dir="." includes="${lock}" />
+ </delete>
+ <echo>${server}: Released the lock</echo>
</target>
-
- <target name="deploy">
- <antcall target="beforeDeploy" />
- <echo message="${server}: Deploying ${war} to ${deployDir}/${autodeployDir}" />
- <copy file="${war}" todir="${deployDir}/${autodeployDir}"/>
- <antcall target="afterDeploy" />
- </target>
-
- <target name="deployStatic">
- <unzip src="${war}" dest="${staticDeployDir}/tmp-unpack-jar/">
- <patternset>
- <include name="WEB-INF/lib/*.jar" />
- </patternset>
- </unzip>
- <unzip dest="${staticDeployDir}">
- <fileset dir="${staticDeployDir}/tmp-unpack-jar/WEB-INF/lib" includes="*.jar" />
-
- <patternset>
- <include name="VAADIN/**" />
- </patternset>
- </unzip>
- <delete dir="${staticDeployDir}/tmp-unpack-jar/" />
-
- <unzip src="${war}" dest="${staticDeployDir}">
- <patternset>
- <include name="VAADIN/**" />
- </patternset>
- </unzip>
- </target>
-
- <target name="unpack-server">
- <echo message="${server}: Unpacking ${server}.tar.gz" />
- <delete dir="${server}" />
- <exec executable="tar">
- <arg value="-xf"/>
- <arg value="${server}.tar.gz"/>
- </exec>
- <move file="${server}" tofile="${deployDir}" />
- <echo message="Done." />
- </target>
-
- <target name="doStartup">
- <exec executable="./run.sh" spawn="${startupSpawn}">
- <env key="JAVA_HOME" value="${JAVA_HOME}" />
- </exec>
- </target>
-
- <target name="startup">
- <antcall target="doStartup" />
- <echo message="${server}: Waiting for ${waitUrl} to become available." />
- <waitfor maxwait="${waitMinutes}" maxwaitunit="minute" checkevery="10000" timeoutproperty="timeout">
- <http url="${waitUrl}" />
- </waitfor>
- <!-- Print load averages to get an indicator on whether the server still attempts to start up -->
- <exec executable="uptime" />
- <fail if="timeout" message="${server} failed to deploy" />
-
- <echo message="${server}: Demo deployed successfully." />
- </target>
-
- <target name="shutdown">
- <exec executable="./stop.sh" >
- <env key="JAVA_HOME" value="${JAVA_HOME}" />
- </exec>
- <sleep seconds="${shutdownWait}" />
- </target>
-
- <target name="force-shutdown">
- <exec executable="./cleanup.sh" />
- </target>
-
- <target name="check-port">
- <fail message="${server}: Something is still listening on port ${serverPort}">
- <condition>
- <socket server="localhost" port="${serverPort}" />
- </condition>
- </fail>
- </target>
-
- <target name="check-lock">
- <available file="${lock}" property="lockAvailable" />
- <fail unless="lockAvailable" message="Instance is not locked!" />
- </target>
-
- <target name="get-lock">
- <mkdir dir="deploy" />
- <echo>${server}: Getting the lock</echo>
- <exec executable="lockfile" failonerror="true">
- <!-- Check every 10 seconds -->
- <arg value="-10" />
- <!-- Retry for 55 minutes (build server gives up after 60 minutes) -->
- <arg value="-r330" />
- <arg value="${lock}" />
- </exec>
- <echo>${server}: Got the lock</echo>
- </target>
-
- <target name="clean">
- <delete dir="${deployDir}" failonerror="false" />
- </target>
-
- <target name="release-lock">
-<!-- <exec executable="rm">
- <arg value="-f" />
- <arg value="${lock}" />
- </exec> -->
- <delete>
- <fileset dir="." includes="${lock}" />
- </delete>
- <echo>${server}: Released the lock</echo>
- </target>
-
- <target name="startup-and-deploy" depends="check-lock,check-port,unpack-server,deploy,startup" />
-
- <target name="shutdown-and-cleanup" depends="shutdown,clean,release-lock,force-shutdown" />
-
+
+ <target name="startup-and-deploy"
+ depends="check-lock,check-port,unpack-server,deploy,startup" />
+
+ <target name="shutdown-and-cleanup" depends="shutdown,clean,release-lock,force-shutdown" />
+
</project>
diff --git a/uitest/integration_tests.xml b/uitest/integration_tests.xml
index cb96834307..ba353dbdbb 100644
--- a/uitest/integration_tests.xml
+++ b/uitest/integration_tests.xml
@@ -1,541 +1,634 @@
<?xml version="1.0"?>
-<project xmlns:antcontrib="antlib:net.sf.antcontrib" name="Vaadin Integration Tests" basedir="." default="integration-test-all">
-
- <!-- Import common targets -->
- <import file="../common.xml" />
- <dirname file="${ant.file.Vaadin Integration Tests}" property="integration_test.dir" />
-
- <!-- 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" />
-
- <!-- Test with these browsers -->
- <property name="test_browsers" value="winxp-firefox17-esr" />
-
- <!-- 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" />
-
- <!-- Host running Testbench RC or Testbench Hub. Default value -->
- <property name="com.vaadin.testbench.tester.host" value="127.0.0.1" />
-
- <!-- Base url where the testable application is deployed -->
- <property name="deployment.url" value="http://${test.integration.server}:8080" />
-
- <!-- ssh host values -->
- <property name="ant.hub" value="${test.integration.antfile}" />
- <property name="user" value="${test.integration.user}" />
- <property name="passphrase" value="" />
-
- <!-- 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" />
- <pathconvert pathsep=" " property="testfiles" 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}" />
- <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />
- <property name="server.start.succeeded" value="1" />
- <property name="browsers" value="${test_browsers}" />
- <property name="testfiles" value="${testfiles}" />
- <property name="test-output-dir" value="${integration_test.dir}/result/integration-test-output/${server-name}" />
- <property name="retries" value="0" />
-
- <fileset dir="." includes="test.xml" />
- </subant>
- </target>
-
- <target name="integration-test-push-servlet">
- <fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-push-servlet.html" />
- <pathconvert pathsep=" " property="testfiles" 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}" />
- <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />
- <property name="server.start.succeeded" value="1" />
- <property name="browsers" value="${test_browsers}" />
- <property name="testfiles" value="${testfiles}" />
- <property name="test-output-dir" value="${integration_test.dir}/result/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}" />
- <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />
- <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />
- <property name="server.start.succeeded" value="1" />
- <property name="testfiles" value="${testfiles-theme}" />
- <property name="test-output-dir" value="${integration_test.dir}/result/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}" />
- <property name="com.vaadin.testbench.deployment.url" value="http://vaadin-integration-test.appspot.com/" />
- <property name="server.start.succeeded" value="1" />
- <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="10" />
- <param name="target-server" value="tomcat7" />
- </antcall>
- </target>
- <target name="integration-test-tomcat5">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="tomcat5" />
- </antcall>
- </target>
-
- <target name="integration-test-tomcat6">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="tomcat6" />
- </antcall>
- </target>
-
- <target name="integration-test-jetty5">
- <antcall target="run-generic-integration-test">
- <param name="target-server" value="jetty5" />
- </antcall>
- </target>
-
- <target name="integration-test-jetty6">
- <antcall target="run-generic-integration-test">
- <param name="target-server" value="jetty6" />
- </antcall>
- </target>
-
- <target name="integration-test-jetty7">
- <antcall target="run-generic-integration-test">
- <param name="target-server" value="jetty7" />
- </antcall>
- </target>
-
- <target name="integration-test-jetty8">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="300" />
- <param name="target-server" value="jetty8" />
- </antcall>
- </target>
-
- <target name="integration-test-jboss4">
- <antcall target="run-generic-integration-test">
- <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="10" />
- <param name="target-server" value="jboss5" />
- </antcall>
- </target>
-
- <target name="integration-test-jboss6">
- <antcall target="run-generic-integration-test">
- <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="10" />
- <param name="target-server" value="jboss7" />
- </antcall>
- </target>
-
- <target name="integration-test-glassfish2">
- <antcall target="run-generic-integration-test">
- <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="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" />
-
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="600" />
- <param name="test_browsers" value="winxp-firefox17-esr" />
- <param name="target-server" value="liferay6" />
- </antcall>
- </target>
-
- <target name="integration-test-liferay6-theme">
- <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6/Liferay6-and-6EE-theme-deploy.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="test_browsers" value="winxp-firefox17-esr" />
- <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="test_browsers" value="winxp-firefox17-esr" />
- <param name="target-server" value="liferay5" />
- </antcall>
- </target>
-
- <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" />
-
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="600" />
- <param name="test_browsers" value="winxp-firefox17-esr" />
- <param name="target-server" value="liferay6ee" />
- </antcall>
- </target>
-
- <target name="integration-test-liferay6ee-theme">
- <fileset dir="integration-testscripts" id="html-test-files" includes="Liferay-6/Liferay6-and-6EE-theme-deploy.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="test_browsers" value="winxp-firefox17-esr" />
- <param name="target-server" value="liferay6ee" />
- </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-googlechrome21" />
- <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-firefox17-esr" />
- <param name="target-server" value="exo3" />
- </antcall>
- </target>
-
- <target name="integration-test-websphere8">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="600" />
- <param name="target-port" value="9080" />
- <param name="target-server" value="websphere8" />
- </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-test-GAE" />
- </target>
-
- <!-- Upload demo, clean error screenshots and test deployment on all servers -->
- <target name="integration-test-all">
- <property name="passphrase" value="${passphrase}" />
- <fail unless="sshkey.file" message="You must define an ssh.keyfile parameter" />
- <fail unless="com.vaadin.testbench.screenshot.directory" message="You must define a com.vaadin.testbench.screenshot.directory parameter" />
- <parallel>
- <antcontrib:trycatch property="tried">
- <try>
- <!-- Still running GAE test from the old server which requires its own lock -->
- <echo message="Getting lock" />
- <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" />
- </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>
- </antcontrib:trycatch>
- <antcall target="integration-test-liferay6" />
- <antcall target="integration-test-liferay6ee" />
- <antcall target="integration-test-liferay6-theme" />
- <antcall target="integration-test-liferay6ee-theme" />
- <antcall target="integration-test-exo3" />
- <antcall target="integration-test-weblogicPortal" />
- <antcall target="integration-test-liferay5" />
- <antcall target="integration-test-weblogic10" />
- <antcall target="integration-test-weblogic12" />
- <antcall target="integration-test-gatein3" />
- <antcall target="integration-test-glassfish2" />
- <antcall target="integration-test-glassfish3" />
- <antcall target="integration-test-jboss4" />
- <antcall target="integration-test-jboss5" />
- <antcall target="integration-test-jboss6" />
- <antcall target="integration-test-jboss7" />
- <antcall target="integration-test-jetty5" />
- <antcall target="integration-test-jetty6" />
- <antcall target="integration-test-jetty7" />
- <antcall target="integration-test-jetty8" />
- <antcall target="integration-test-tomcat5" />
- <antcall target="integration-test-tomcat6" />
- <antcall target="integration-test-tomcat7" />
- <antcall target="integration-test-websphere8" />
-
- </parallel>
-
- </target>
-
- <target name="do-run-generic-test">
- <property name="target-host" value="${target-server}.devnet.vaadin.com" />
- <property name="target-port" value="8080" />
- <antcontrib:if>
- <isset property="startDelay" />
- <then>
- <antcontrib:math result="sleepTime" datatype="int">
- <op op="rint">
- <op op="*">
- <num value="${startDelay}" />
- <op op="random" />
- </op>
- </op>
- </antcontrib:math>
- <echo>Delaying startup of ${target-server} with ${sleepTime} seconds</echo>
- <sleep seconds="${sleepTime}" />
- </then>
- </antcontrib:if>
-
- <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 -->
- <antcontrib:trycatch property="error_message">
- <try>
- <!-- timeout in one hour (remote end should timeout in 55 minutes) -->
- <sshexec host="${target-host}" outputproperty="lock-output" timeout="3600000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="chmod +x *.sh; ant -f deploy.xml get-lock" />
- <antcall target="echo-prefix">
- <param name="prefix" value="${target-server}: " />
- <param name="message" value="${lock-output}" />
- </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>
- <contains string="${start-output}" substring="Demo deployed successfully" />
- </not>
- </condition>
- </fail>
-
- <copy file="integration-testscripts/common/integration_test.tpl" tofile="integration-testscripts/integration-test-${target-server}-servlet.html" overwrite="true" />
- <antcall target="integration-test-servlet">
- <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 -->
- <antcontrib:if>
- <isset property="testfiles-theme" />
- <antcontrib:then>
- <antcall target="integration-test-theme">
- <param name="server-name" value="${target-server}" />
- <param name="deployment.url" value="http://${target-host}:${target-port}" />
- </antcall>
- </antcontrib:then>
- </antcontrib:if>
-
- <!-- Run integration tests with push -->
- <copy file="integration-testscripts/common/integration_push_test.tpl" tofile="integration-testscripts/integration-test-${target-server}-push-servlet.html" overwrite="true" />
- <antcall target="integration-test-push-servlet">
- <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 -->
- <antcontrib:if>
- <isset property="testfiles-theme" />
- <antcontrib:then>
- <antcall target="integration-test-theme">
- <param name="server-name" value="${target-server}" />
- <param name="deployment.url" value="http://${target-host}:${target-port}" />
- </antcall>
- </antcontrib:then>
- </antcontrib:if>
-
- <!-- timeout in five minutes -->
- <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}" />
- </antcall>
- </try>
- <catch>
- <fail message="${error_message}" />
- </catch>
- </antcontrib:trycatch>
- </target>
-
- <target name="echo-prefix">
- <antcontrib: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>
- <antcontrib:trycatch property="tried">
- <try>
- <antcall target="do-run-generic-test" />
- </try>
- <catch>
- <antcontrib:antcallback target="teamcity-escape" return="tried-escaped">
- <param name="returnTo" value="tried-escaped" />
- <param name="message" value="${tried}" />
- </antcontrib:antcallback>
- <concat>##teamcity[testFailed name='${target-server}' flowId='${target-server}' message='Integration test for ${target-server} failed.' details='${tried-escaped}']</concat>
- </catch>
- </antcontrib:trycatch>
- <concat>##teamcity[testFinished name='${target-server}' flowId='${target-server}']"</concat>
- </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 -->
- <antcontrib:propertyregex property="details-escaped1" input="${message}" regexp="['|\[\]]" replace="|\0" global="true" defaultValue="${message}" />
- <antcontrib:propertyregex property="details-escaped2" input="${details-escaped1}" regexp="\n" replace="|n" global="true" defaultValue="${details-escaped1}" />
- <antcontrib: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>
- <antcontrib:trycatch property="tried">
- <try>
- <antcall target="integration-test-${target-server}" />
- </try>
- <catch>
- <antcallback target="teamcity-escape" return="tried-escaped">
- <param name="returnTo" value="tried-escaped" />
- <param name="message" value="${tried}" />
- </antcallback>
- <concat>##teamcity[testFailed name='${target-server}' flowId='${target-server}' message='Integration test for ${target-server} failed.' details='${tried-escaped}']"</concat>
- </catch>
- </antcontrib: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" />
- </target>
+<project xmlns:antcontrib="antlib:net.sf.antcontrib" name="Vaadin Integration Tests"
+ basedir="." default="integration-test-all">
+
+ <!-- Import common targets -->
+ <import file="../common.xml" />
+ <dirname file="${ant.file.Vaadin Integration Tests}"
+ property="integration_test.dir" />
+
+ <!-- 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" />
+
+ <!-- Test with these browsers -->
+ <property name="test_browsers" value="winxp-firefox17-esr" />
+
+ <!-- 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" />
+
+ <!-- Host running Testbench RC or Testbench Hub. Default value -->
+ <property name="com.vaadin.testbench.tester.host" value="127.0.0.1" />
+
+ <!-- Base url where the testable application is deployed -->
+ <property name="deployment.url" value="http://${test.integration.server}:8080" />
+
+ <!-- ssh host values -->
+ <property name="ant.hub" value="${test.integration.antfile}" />
+ <property name="user" value="${test.integration.user}" />
+ <property name="passphrase" value="" />
+
+ <!-- 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" />
+ <pathconvert pathsep=" " property="testfiles" 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}" />
+ <property name="com.vaadin.testbench.deployment.url"
+ value="${deployment.url}" />
+ <property name="server.start.succeeded" value="1" />
+ <property name="browsers" value="${test_browsers}" />
+ <property name="testfiles" value="${testfiles}" />
+ <property name="test-output-dir"
+ value="${integration_test.dir}/result/integration-test-output/${server-name}" />
+ <property name="retries" value="0" />
+
+ <fileset dir="." includes="test.xml" />
+ </subant>
+ </target>
+
+ <target name="integration-test-push-servlet">
+ <fileset dir="integration-testscripts" id="html-test-files"
+ includes="integration-test-${server-name}-push-servlet.html" />
+ <pathconvert pathsep=" " property="testfiles" 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}" />
+ <property name="com.vaadin.testbench.deployment.url"
+ value="${deployment.url}" />
+ <property name="server.start.succeeded" value="1" />
+ <property name="browsers" value="${test_browsers}" />
+ <property name="testfiles" value="${testfiles}" />
+ <property name="test-output-dir"
+ value="${integration_test.dir}/result/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}" />
+ <property name="com.vaadin.testbench.tester.host"
+ value="${com.vaadin.testbench.tester.host}" />
+ <property name="com.vaadin.testbench.deployment.url"
+ value="${deployment.url}" />
+ <property name="server.start.succeeded" value="1" />
+ <property name="testfiles" value="${testfiles-theme}" />
+ <property name="test-output-dir"
+ value="${integration_test.dir}/result/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}" />
+ <property name="com.vaadin.testbench.deployment.url"
+ value="http://vaadin-integration-test.appspot.com/" />
+ <property name="server.start.succeeded" value="1" />
+ <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="10" />
+ <param name="target-server" value="tomcat7" />
+ </antcall>
+ </target>
+ <target name="integration-test-tomcat5">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="tomcat5" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-tomcat6">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="10" />
+ <param name="target-server" value="tomcat6" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jetty5">
+ <antcall target="run-generic-integration-test">
+ <param name="target-server" value="jetty5" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jetty6">
+ <antcall target="run-generic-integration-test">
+ <param name="target-server" value="jetty6" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jetty7">
+ <antcall target="run-generic-integration-test">
+ <param name="target-server" value="jetty7" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jetty8">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="300" />
+ <param name="target-server" value="jetty8" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jboss4">
+ <antcall target="run-generic-integration-test">
+ <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="10" />
+ <param name="target-server" value="jboss5" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-jboss6">
+ <antcall target="run-generic-integration-test">
+ <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="10" />
+ <param name="target-server" value="jboss7" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-glassfish2">
+ <antcall target="run-generic-integration-test">
+ <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="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" />
+
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="test_browsers" value="winxp-firefox17-esr" />
+ <param name="target-server" value="liferay6" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-liferay6-theme">
+ <fileset dir="integration-testscripts" id="html-test-files"
+ includes="Liferay-6/Liferay6-and-6EE-theme-deploy.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="test_browsers" value="winxp-firefox17-esr" />
+ <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="test_browsers" value="winxp-firefox17-esr" />
+ <param name="target-server" value="liferay5" />
+ </antcall>
+ </target>
+
+ <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" />
+
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="test_browsers" value="winxp-firefox17-esr" />
+ <param name="target-server" value="liferay6ee" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-liferay6ee-theme">
+ <fileset dir="integration-testscripts" id="html-test-files"
+ includes="Liferay-6/Liferay6-and-6EE-theme-deploy.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="test_browsers" value="winxp-firefox17-esr" />
+ <param name="target-server" value="liferay6ee" />
+ </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-googlechrome21" />
+ <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-firefox17-esr" />
+ <param name="target-server" value="exo3" />
+ </antcall>
+ </target>
+
+ <target name="integration-test-websphere8">
+ <antcall target="run-generic-integration-test">
+ <param name="startDelay" value="600" />
+ <param name="target-port" value="9080" />
+ <param name="target-server" value="websphere8" />
+ </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-test-GAE" />
+ </target>
+
+ <!-- Upload demo, clean error screenshots and test deployment on all
+ servers -->
+ <target name="integration-test-all">
+ <property name="passphrase" value="${passphrase}" />
+ <fail unless="sshkey.file" message="You must define an ssh.keyfile parameter" />
+ <fail unless="com.vaadin.testbench.screenshot.directory"
+ message="You must define a com.vaadin.testbench.screenshot.directory parameter" />
+ <parallel>
+ <antcontrib:trycatch property="tried">
+ <try>
+ <!-- Still running GAE test from the old server which
+ requires its own lock -->
+ <echo message="Getting lock" />
+ <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" />
+ </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>
+ </antcontrib:trycatch>
+ <antcall target="integration-test-liferay6" />
+ <antcall target="integration-test-liferay6ee" />
+ <antcall target="integration-test-liferay6-theme" />
+ <antcall target="integration-test-liferay6ee-theme" />
+ <antcall target="integration-test-exo3" />
+ <antcall target="integration-test-weblogicPortal" />
+ <antcall target="integration-test-liferay5" />
+ <antcall target="integration-test-weblogic10" />
+ <antcall target="integration-test-weblogic12" />
+ <antcall target="integration-test-gatein3" />
+ <antcall target="integration-test-glassfish2" />
+ <antcall target="integration-test-glassfish3" />
+ <antcall target="integration-test-jboss4" />
+ <antcall target="integration-test-jboss5" />
+ <antcall target="integration-test-jboss6" />
+ <antcall target="integration-test-jboss7" />
+ <antcall target="integration-test-jetty5" />
+ <antcall target="integration-test-jetty6" />
+ <antcall target="integration-test-jetty7" />
+ <antcall target="integration-test-jetty8" />
+ <antcall target="integration-test-tomcat5" />
+ <antcall target="integration-test-tomcat6" />
+ <antcall target="integration-test-tomcat7" />
+ <antcall target="integration-test-websphere8" />
+
+ </parallel>
+
+ </target>
+
+ <target name="do-run-generic-test">
+ <property name="target-host" value="${target-server}.devnet.vaadin.com" />
+ <property name="target-port" value="8080" />
+ <antcontrib:if>
+ <isset property="startDelay" />
+ <then>
+ <antcontrib:math result="sleepTime"
+ datatype="int">
+ <op op="rint">
+ <op op="*">
+ <num value="${startDelay}" />
+ <op op="random" />
+ </op>
+ </op>
+ </antcontrib:math>
+ <echo>Delaying startup of ${target-server} with
+ ${sleepTime} seconds</echo>
+ <sleep seconds="${sleepTime}" />
+ </then>
+ </antcontrib:if>
+
+ <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 -->
+ <antcontrib:trycatch property="error_message">
+ <try>
+ <!-- timeout in one hour (remote end should timeout in 55
+ minutes) -->
+ <sshexec host="${target-host}" outputproperty="lock-output"
+ timeout="3600000" username="${user}" keyfile="${sshkey.file}"
+ trust="yes" command="chmod +x *.sh; ant -f deploy.xml get-lock" />
+ <antcall target="echo-prefix">
+ <param name="prefix" value="${target-server}: " />
+ <param name="message" value="${lock-output}" />
+ </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>
+ <contains string="${start-output}"
+ substring="Demo deployed successfully" />
+ </not>
+ </condition>
+ </fail>
+
+ <copy
+ file="integration-testscripts/common/integration_test.tpl"
+ tofile="integration-testscripts/integration-test-${target-server}-servlet.html"
+ overwrite="true" />
+ <antcall target="integration-test-servlet">
+ <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 -->
+ <antcontrib:if>
+ <isset property="testfiles-theme" />
+ <antcontrib:then>
+ <antcall target="integration-test-theme">
+ <param name="server-name" value="${target-server}" />
+ <param name="deployment.url"
+ value="http://${target-host}:${target-port}" />
+ </antcall>
+ </antcontrib:then>
+ </antcontrib:if>
+
+ <!-- Run integration tests with push -->
+ <copy
+ file="integration-testscripts/common/integration_push_test.tpl"
+ tofile="integration-testscripts/integration-test-${target-server}-push-servlet.html"
+ overwrite="true" />
+ <antcall target="integration-test-push-servlet">
+ <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 -->
+ <antcontrib:if>
+ <isset property="testfiles-theme" />
+ <antcontrib:then>
+ <antcall target="integration-test-theme">
+ <param name="server-name" value="${target-server}" />
+ <param name="deployment.url"
+ value="http://${target-host}:${target-port}" />
+ </antcall>
+ </antcontrib:then>
+ </antcontrib:if>
+
+ <!-- timeout in five minutes -->
+ <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}" />
+ </antcall>
+ </try>
+ <catch>
+ <fail message="${error_message}" />
+ </catch>
+ </antcontrib:trycatch>
+ </target>
+
+ <target name="echo-prefix">
+ <antcontrib: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>
+ <antcontrib:trycatch property="tried">
+ <try>
+ <antcall target="do-run-generic-test" />
+ </try>
+ <catch>
+ <antcontrib:antcallback target="teamcity-escape"
+ return="tried-escaped">
+ <param name="returnTo" value="tried-escaped" />
+ <param name="message" value="${tried}" />
+ </antcontrib:antcallback>
+ <concat>##teamcity[testFailed name='${target-server}'
+ flowId='${target-server}' message='Integration test
+ for ${target-server} failed.'
+ details='${tried-escaped}']</concat>
+ </catch>
+ </antcontrib:trycatch>
+ <concat>##teamcity[testFinished name='${target-server}'
+ flowId='${target-server}']"</concat>
+ </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 -->
+ <antcontrib:propertyregex property="details-escaped1"
+ input="${message}" regexp="['|\[\]]" replace="|\0" global="true"
+ defaultValue="${message}" />
+ <antcontrib:propertyregex property="details-escaped2"
+ input="${details-escaped1}" regexp="\n" replace="|n" global="true"
+ defaultValue="${details-escaped1}" />
+ <antcontrib: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>
+ <antcontrib:trycatch property="tried">
+ <try>
+ <antcall target="integration-test-${target-server}" />
+ </try>
+ <catch>
+ <antcallback target="teamcity-escape"
+ return="tried-escaped">
+ <param name="returnTo" value="tried-escaped" />
+ <param name="message" value="${tried}" />
+ </antcallback>
+ <concat>##teamcity[testFailed name='${target-server}'
+ flowId='${target-server}' message='Integration test
+ for ${target-server} failed.'
+ details='${tried-escaped}']"</concat>
+ </catch>
+ </antcontrib: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" />
+ </target>
</project>
diff --git a/uitest/ivy.xml b/uitest/ivy.xml
index bb54232852..7ff83324ae 100644
--- a/uitest/ivy.xml
+++ b/uitest/ivy.xml
@@ -14,8 +14,8 @@
<conf name="jetty-run" extends="build" visibility="private" />
</configurations>
<publications>
- <artifact type="war" ext="war"/>
- </publications>
+ <artifact type="war" ext="war" />
+ </publications>
<dependencies defaultconf="build" defaultconfmapping="build,ide->default">
<!-- API DEPENDENCIES -->
<dependency org="javax.portlet" name="portlet-api"
@@ -40,9 +40,9 @@
rev="${vaadin.version}" conf="build->build"></dependency>
<dependency org="com.vaadin" name="vaadin-themes"
rev="${vaadin.version}" conf="build->build"></dependency>
- <dependency org="com.vaadin" name="vaadin-push"
- rev="${vaadin.version}" conf="build->build"></dependency>
-
+ <dependency org="com.vaadin" name="vaadin-push" rev="${vaadin.version}"
+ conf="build->build"></dependency>
+
<!-- For compiling TestingWidgetSet -->
<dependency org="com.vaadin" name="vaadin-client-compiler"
rev="${vaadin.version}" conf="build-provided-> build"></dependency>
diff --git a/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml b/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
index 1b47a86113..fd52e5cd0e 100644
--- a/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
+++ b/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
@@ -1,15 +1,16 @@
<module>
- <!-- WS Compiler: manually edited -->
+ <!-- WS Compiler: manually edited -->
+
+ <!-- Inherit the DefaultWidgetSet -->
+ <inherits name="com.vaadin.DefaultWidgetSet" />
- <!-- Inherit the DefaultWidgetSet -->
- <inherits name="com.vaadin.DefaultWidgetSet" />
-
<replace-with class="com.vaadin.tests.widgetset.client.CustomUIConnector">
<when-type-is class="com.vaadin.client.ui.ui.UIConnector" />
</replace-with>
-
- <replace-with class="com.vaadin.tests.widgetset.client.TestingPushConnection">
+
+ <replace-with
+ class="com.vaadin.tests.widgetset.client.TestingPushConnection">
<when-type-is class="com.vaadin.client.communication.PushConnection" />
</replace-with>
-
+
</module>
diff --git a/uitest/test.xml b/uitest/test.xml
index 8228bd9d70..44dac13d90 100644
--- a/uitest/test.xml
+++ b/uitest/test.xml
@@ -1,189 +1,227 @@
<?xml version="1.0"?>
-<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant" name="Run Vaadin Testbench Tests" basedir="." default="run-and-clean-up">
-
- <include file="../common.xml" />
- <dirname property="test.xml.dir" file="${ant.file.Run Vaadin Testbench Tests}" />
-
- <!-- ================================================================== -->
- <!-- Configuration -->
- <!-- ================================================================== -->
- <!-- Browsers to use for testing -->
- <property name="browsers-windows" value="winxp-ie8,win7-ie9,win7-ie10,winxp-firefox17-esr,winxp-safari5,winxp-googlechrome21,winxp-opera12" />
- <property name="browsers-linux" value="linux-firefox3,linux-opera10,linux-googlechrome8" />
- <property name="browsers-mac" value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" />
-
- <property name="browsers" value="${browsers-windows}" />
-
- <!-- Number of times to retry a test if it fails -->
- <property name="retries" value="2" />
-
- <!-- Screen shot base directory -->
- <fail unless="com.vaadin.testbench.screenshot.directory" message="The 'com.vaadin.testbench.screenshot.directory' property must be defined." />
-
- <!-- Screen shot resolution -->
- <property name="com.vaadin.testbench.screenshot.resolution" value="1500x850" />
-
- <!-- Host running Testbench Hub -->
- <property name="com.vaadin.testbench.tester.host" value="testbench-hub.intra.itmill.com" />
-
- <property name="com.vaadin.testbench.screenshot.block.error" value="0.025" />
- <property name="com.vaadin.testbench.debug" value="false" />
-
-
- <target name="initialize">
- <!-- classpath must include test bench jar and its dependencies -->
- <path id="classpath">
- <fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" />
- </path>
- </target>
-
- <!-- fileset containing all TestBench tests to run -->
- <fileset dir="${test.xml.dir}" id="html-test-files">
- <include name="src/**/*.html" />
- <exclude name="integration-testscripts/**/*.html" />
- </fileset>
-
- <!-- This target converts HTML tests files to java junit tests. One test file for each browser is created. -->
- <target name="create-tests" depends="initialize, remove-temp-testclasses">
- <!-- Temporary output directory, created and removed by this script -->
- <fail unless="test-output-dir" message="The 'test-output-dir' property must be defined." />
- <property name="class-dir" value="${test-output-dir}/classes" />
-
- <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
-
- <java classname="com.vaadin.testbench.util.TestConverter" classpathref="classpath" fork="true">
- <sysproperty key="com.vaadin.testbench.test.retries" value="${retries}" />
- <jvmarg value="-Duser.language=en" />
- <jvmarg value="-Duser.country=US" />
- <arg value="${test-output-dir}" />
- <arg value="${browsers}" />
- <arg line="${testfiles}" />
- </java>
- </target>
-
-
- <!-- This target complies the generated java junit tests. -->
- <target name="compile-tests" depends="create-tests">
- <mkdir dir="${class-dir}" />
- <javac includeantruntime="false" srcdir="${test-output-dir}" destdir="${class-dir}" debug="on" fork="yes" failonerror="false" encoding="UTF8">
- <classpath>
- <path refid="classpath" />
- </classpath>
- </javac>
- </target>
-
- <!-- ================================================================== -->
- <!-- Running Tests -->
- <!-- ================================================================== -->
-
- <target name="check-parameters">
- <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined." />
- <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined." />
- <fail unless="com.vaadin.testbench.deployment.url" message="The 'com.vaadin.testbench.deployment.url' property must be defined." />
- </target>
-
- <target name="run-tests" depends="compile-tests">
- <fileset dir="${test-output-dir}" id="tests-fileset">
- <include name="**/**.java" />
- </fileset>
-
- <antcontrib:for threadCount="30" parallel="true" keepgoing="true" param="target">
- <path>
- <fileset refid="tests-fileset" />
- </path>
- <sequential>
- <antcall target="execute-tests">
- <param name="target" value="@{target}" />
- <reference refid="classpath" />
- </antcall>
- </sequential>
- </antcontrib:for>
- </target>
-
- <!-- This target runs the generated and compiled junit tests -->
- <target name="execute-tests">
- <junit fork="yes" printsummary="withOutAndErr" maxmemory="96m">
- <classpath>
- <path refid="classpath" />
- <pathelement path="${class-dir}" />
- </classpath>
-
- <formatter usefile="false" type="plain" />
-
- <jvmarg value="-Dcom.vaadin.testbench.tester.host=${com.vaadin.testbench.tester.host}" />
- <jvmarg value="-Dcom.vaadin.testbench.deployment.url=${com.vaadin.testbench.deployment.url}" />
- <!-- Define where the reference screenshots and diff files are saved -->
- <jvmarg value="-Dcom.vaadin.testbench.screenshot.directory=${com.vaadin.testbench.screenshot.directory}" />
- <!-- Resolution for screenshots -->
- <jvmarg value="-Dcom.vaadin.testbench.screenshot.resolution=${com.vaadin.testbench.screenshot.resolution}" />
- <jvmarg value="-Dcom.vaadin.testbench.debug=${com.vaadin.testbench.debug}" />
- <jvmarg value="-Dcom.vaadin.testbench.screenshot.block.error=${com.vaadin.testbench.screenshot.block.error}" />
-
-
- <jvmarg value="-Djava.awt.headless=true" />
-
- <!-- true/false system arguments -->
- <jvmarg value="-Dcom.vaadin.testbench.screenshot.softfail=${com.vaadin.testbench.screenshot.softfail}" />
- <jvmarg value="-Dcom.vaadin.testbench.screenshot.reference.debug=${com.vaadin.testbench.screenshot.reference.debug}" />
- <jvmarg value="-Dcom.vaadin.testbench.screenshot.cursor=${com.vaadin.testbench.screenshot.cursor}" />
-
- <batchtest>
- <filelist dir="${test-output-dir}" files="${target}" />
- </batchtest>
- </junit>
-
- </target>
-
- <!-- Remove temporary source and compiled java files -->
- <target name="remove-temp-testclasses">
- <delete failonerror="false">
- <fileset dir="${test-output-dir}">
- <include name="**/**.java" />
- <include name="**/**.class" />
- </fileset>
- </delete>
- </target>
-
- <!-- Remove old error screenshots -->
- <target name="remove-error-screens">
- <mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" />
- <delete>
- <fileset dir="${com.vaadin.testbench.screenshot.directory}/errors">
- <include name="**/**.*" />
- </fileset>
- </delete>
- </target>
-
- <!-- ================================================================== -->
- <!-- Main Targets -->
- <!-- ================================================================== -->
-
- <!-- The default target. -->
- <target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tests" />
-
-
- <!-- Starts the server and runs all TestBench tests -->
- <target name="test-package">
- <fail unless="war.file" message="No 'war.file' parameter given." />
- <property name="test-output-dir" location="${test.xml.dir}/result/testbench-junit-classes" />
- <property name="retries" value="2" />
-
- <!-- Parameters for the test.xml script. -->
- <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined." />
- <fail unless="com.vaadin.testbench.deployment.url" message="The 'com.vaadin.testbench.deployment.url' property must be defined." />
- <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined." />
- <property name="com.vaadin.testbench.screenshot.block.error" value="0.025" />
- <property name="com.vaadin.testbench.debug" value="false" />
-
- <parallel>
- <daemons>
- <ant antfile="${test.xml.dir}/vaadin-server.xml" inheritall="true" inheritrefs="true" target="deploy-and-start" />
- </daemons>
- <sequential>
- <ant antfile="${test.xml.dir}/vaadin-server.xml" target="wait-for-startup" />
- <antcall inheritall="true" inheritrefs="true" target="run-and-clean-up" />
- <echo message="All TestBench tests have been run" />
- </sequential>
- </parallel>
- </target>
+<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant"
+ name="Run Vaadin Testbench Tests" basedir="." default="run-and-clean-up">
+
+ <include file="../common.xml" />
+ <dirname property="test.xml.dir" file="${ant.file.Run Vaadin Testbench Tests}" />
+
+ <!-- ================================================================== -->
+ <!-- Configuration -->
+ <!-- ================================================================== -->
+ <!-- Browsers to use for testing -->
+ <property name="browsers-windows"
+ value="winxp-ie8,win7-ie9,win7-ie10,winxp-firefox17-esr,winxp-safari5,winxp-googlechrome21,winxp-opera12" />
+ <property name="browsers-linux"
+ value="linux-firefox3,linux-opera10,linux-googlechrome8" />
+ <property name="browsers-mac"
+ value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" />
+
+ <property name="browsers" value="${browsers-windows}" />
+
+ <!-- Number of times to retry a test if it fails -->
+ <property name="retries" value="2" />
+
+ <!-- Screen shot base directory -->
+ <fail unless="com.vaadin.testbench.screenshot.directory"
+ message="The 'com.vaadin.testbench.screenshot.directory' property must be defined." />
+
+ <!-- Screen shot resolution -->
+ <property name="com.vaadin.testbench.screenshot.resolution"
+ value="1500x850" />
+
+ <!-- Host running Testbench Hub -->
+ <property name="com.vaadin.testbench.tester.host" value="testbench-hub.intra.itmill.com" />
+
+ <property name="com.vaadin.testbench.screenshot.block.error"
+ value="0.025" />
+ <property name="com.vaadin.testbench.debug" value="false" />
+
+
+ <target name="initialize">
+ <!-- classpath must include test bench jar and its dependencies -->
+ <path id="classpath">
+ <fileset dir="${com.vaadin.testbench.lib.dir}"
+ includes="**/*.jar" />
+ </path>
+ </target>
+
+ <!-- fileset containing all TestBench tests to run -->
+ <fileset dir="${test.xml.dir}" id="html-test-files">
+ <include name="src/**/*.html" />
+ <exclude name="integration-testscripts/**/*.html" />
+ </fileset>
+
+ <!-- This target converts HTML tests files to java junit tests. One test
+ file for each browser is created. -->
+ <target name="create-tests" depends="initialize, remove-temp-testclasses">
+ <!-- Temporary output directory, created and removed by this script -->
+ <fail unless="test-output-dir"
+ message="The 'test-output-dir' property must be defined." />
+ <property name="class-dir" value="${test-output-dir}/classes" />
+
+ <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
+
+ <java classname="com.vaadin.testbench.util.TestConverter"
+ classpathref="classpath" fork="true">
+ <sysproperty key="com.vaadin.testbench.test.retries"
+ value="${retries}" />
+ <jvmarg value="-Duser.language=en" />
+ <jvmarg value="-Duser.country=US" />
+ <arg value="${test-output-dir}" />
+ <arg value="${browsers}" />
+ <arg line="${testfiles}" />
+ </java>
+ </target>
+
+
+ <!-- This target complies the generated java junit tests. -->
+ <target name="compile-tests" depends="create-tests">
+ <mkdir dir="${class-dir}" />
+ <javac includeantruntime="false" srcdir="${test-output-dir}"
+ destdir="${class-dir}" debug="on" fork="yes" failonerror="false"
+ encoding="UTF8">
+ <classpath>
+ <path refid="classpath" />
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Running Tests -->
+ <!-- ================================================================== -->
+
+ <target name="check-parameters">
+ <fail unless="com.vaadin.testbench.lib.dir"
+ message="The 'com.vaadin.testbench.lib.dir' property must be defined." />
+ <fail unless="com.vaadin.testbench.tester.host"
+ message="The 'com.vaadin.testbench.tester.host' property must be defined." />
+ <fail unless="com.vaadin.testbench.deployment.url"
+ message="The 'com.vaadin.testbench.deployment.url' property must be defined." />
+ </target>
+
+ <target name="run-tests" depends="compile-tests">
+ <fileset dir="${test-output-dir}" id="tests-fileset">
+ <include name="**/**.java" />
+ </fileset>
+
+ <antcontrib:for threadCount="30" parallel="true"
+ keepgoing="true" param="target">
+ <path>
+ <fileset refid="tests-fileset" />
+ </path>
+ <sequential>
+ <antcall target="execute-tests">
+ <param name="target" value="@{target}" />
+ <reference refid="classpath" />
+ </antcall>
+ </sequential>
+ </antcontrib:for>
+ </target>
+
+ <!-- This target runs the generated and compiled junit tests -->
+ <target name="execute-tests">
+ <junit fork="yes" printsummary="withOutAndErr" maxmemory="96m">
+ <classpath>
+ <path refid="classpath" />
+ <pathelement path="${class-dir}" />
+ </classpath>
+
+ <formatter usefile="false" type="plain" />
+
+ <jvmarg
+ value="-Dcom.vaadin.testbench.tester.host=${com.vaadin.testbench.tester.host}" />
+ <jvmarg
+ value="-Dcom.vaadin.testbench.deployment.url=${com.vaadin.testbench.deployment.url}" />
+ <!-- Define where the reference screenshots and diff files are
+ saved -->
+ <jvmarg
+ value="-Dcom.vaadin.testbench.screenshot.directory=${com.vaadin.testbench.screenshot.directory}" />
+ <!-- Resolution for screenshots -->
+ <jvmarg
+ value="-Dcom.vaadin.testbench.screenshot.resolution=${com.vaadin.testbench.screenshot.resolution}" />
+ <jvmarg
+ value="-Dcom.vaadin.testbench.debug=${com.vaadin.testbench.debug}" />
+ <jvmarg
+ value="-Dcom.vaadin.testbench.screenshot.block.error=${com.vaadin.testbench.screenshot.block.error}" />
+
+
+ <jvmarg value="-Djava.awt.headless=true" />
+
+ <!-- true/false system arguments -->
+ <jvmarg
+ value="-Dcom.vaadin.testbench.screenshot.softfail=${com.vaadin.testbench.screenshot.softfail}" />
+ <jvmarg
+ value="-Dcom.vaadin.testbench.screenshot.reference.debug=${com.vaadin.testbench.screenshot.reference.debug}" />
+ <jvmarg
+ value="-Dcom.vaadin.testbench.screenshot.cursor=${com.vaadin.testbench.screenshot.cursor}" />
+
+ <batchtest>
+ <filelist dir="${test-output-dir}" files="${target}" />
+ </batchtest>
+ </junit>
+
+ </target>
+
+ <!-- Remove temporary source and compiled java files -->
+ <target name="remove-temp-testclasses">
+ <delete failonerror="false">
+ <fileset dir="${test-output-dir}">
+ <include name="**/**.java" />
+ <include name="**/**.class" />
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- Remove old error screenshots -->
+ <target name="remove-error-screens">
+ <mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" />
+ <delete>
+ <fileset
+ dir="${com.vaadin.testbench.screenshot.directory}/errors">
+ <include name="**/**.*" />
+ </fileset>
+ </delete>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Main Targets -->
+ <!-- ================================================================== -->
+
+ <!-- The default target. -->
+ <target name="run-and-clean-up"
+ depends="check-parameters,remove-error-screens,run-tests" />
+
+
+ <!-- Starts the server and runs all TestBench tests -->
+ <target name="test-package">
+ <fail unless="war.file" message="No 'war.file' parameter given." />
+ <property name="test-output-dir"
+ location="${test.xml.dir}/result/testbench-junit-classes" />
+ <property name="retries" value="2" />
+
+ <!-- Parameters for the test.xml script. -->
+ <fail unless="com.vaadin.testbench.tester.host"
+ message="The 'com.vaadin.testbench.tester.host' property must be defined." />
+ <fail unless="com.vaadin.testbench.deployment.url"
+ message="The 'com.vaadin.testbench.deployment.url' property must be defined." />
+ <fail unless="com.vaadin.testbench.lib.dir"
+ message="The 'com.vaadin.testbench.lib.dir' property must be defined." />
+ <property name="com.vaadin.testbench.screenshot.block.error"
+ value="0.025" />
+ <property name="com.vaadin.testbench.debug" value="false" />
+
+ <parallel>
+ <daemons>
+ <ant antfile="${test.xml.dir}/vaadin-server.xml"
+ inheritall="true" inheritrefs="true" target="deploy-and-start" />
+ </daemons>
+ <sequential>
+ <ant antfile="${test.xml.dir}/vaadin-server.xml"
+ target="wait-for-startup" />
+ <antcall inheritall="true" inheritrefs="true"
+ target="run-and-clean-up" />
+ <echo message="All TestBench tests have been run" />
+ </sequential>
+ </parallel>
+ </target>
</project>
diff --git a/uitest/vaadin-server.xml b/uitest/vaadin-server.xml
index 5741d78525..4b32cebe26 100644
--- a/uitest/vaadin-server.xml
+++ b/uitest/vaadin-server.xml
@@ -1,34 +1,38 @@
<?xml version="1.0"?>
-<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant" name="vaadin-server" default="deploy-and-start" basedir=".">
- <include file="../common.xml" />
- <dirname property="dir" file="${ant.file.vaadin-server}" />
+<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant"
+ name="vaadin-server" default="deploy-and-start" basedir=".">
+ <include file="../common.xml" />
+ <dirname property="dir" file="${ant.file.vaadin-server}" />
- <target name="deploy-and-start">
- <fail unless="war.file" message="No war file given in 'war.file'" />
+ <target name="deploy-and-start">
+ <fail unless="war.file" message="No war file given in 'war.file'" />
- <ivy:resolve file="${dir}/ivy.xml" />
- <ivy:cachepath pathid="classpath.jetty" conf="jetty-run" />
- <java classname="org.mortbay.jetty.runner.Runner" fork="yes" output="${vaadin.basedir}/result/jetty.java.out" resultproperty="resultCode">
- <arg value="--port" />
- <arg value="8888" />
- <arg value="--out" />
- <arg value="${vaadin.basedir}/result/jetty.out" />
- <arg value="--log" />
- <arg value="${vaadin.basedir}/result/jetty.log" />
- <arg value="${war.file}" />
- <classpath refid="classpath.jetty" />
- <jvmarg value="-ea" />
- </java>
- <echo message="Jetty process ended with result code ${resultCode}" />
+ <ivy:resolve file="${dir}/ivy.xml" />
+ <ivy:cachepath pathid="classpath.jetty" conf="jetty-run" />
+ <java classname="org.mortbay.jetty.runner.Runner" fork="yes"
+ output="${vaadin.basedir}/result/jetty.java.out"
+ resultproperty="resultCode">
+ <arg value="--port" />
+ <arg value="8888" />
+ <arg value="--out" />
+ <arg value="${vaadin.basedir}/result/jetty.out" />
+ <arg value="--log" />
+ <arg value="${vaadin.basedir}/result/jetty.log" />
+ <arg value="${war.file}" />
+ <classpath refid="classpath.jetty" />
+ <jvmarg value="-ea" />
+ </java>
+ <echo message="Jetty process ended with result code ${resultCode}" />
- </target>
+ </target>
- <target name="wait-for-startup">
- <echo>Waiting for Servlet Container to start up.</echo>
- <waitfor maxwait="60" maxwaitunit="second" checkevery="5" checkeveryunit="second" timeoutproperty="server.start.failed">
- <http url="http://localhost:8888" />
- </waitfor>
- <fail if="server.start.failed" message="Server startup failed" />
- </target>
+ <target name="wait-for-startup">
+ <echo>Waiting for Servlet Container to start up.</echo>
+ <waitfor maxwait="60" maxwaitunit="second" checkevery="5"
+ checkeveryunit="second" timeoutproperty="server.start.failed">
+ <http url="http://localhost:8888" />
+ </waitfor>
+ <fail if="server.start.failed" message="Server startup failed" />
+ </target>
</project>