summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
Diffstat (limited to 'uitest')
-rw-r--r--uitest/build.xml32
-rw-r--r--uitest/integration_tests.xml197
-rw-r--r--uitest/test.xml106
-rw-r--r--uitest/vaadin-server.xml10
4 files changed, 109 insertions, 236 deletions
diff --git a/uitest/build.xml b/uitest/build.xml
index dc9258a807..d4dbb648c1 100644
--- a/uitest/build.xml
+++ b/uitest/build.xml
@@ -1,7 +1,6 @@
<?xml version="1.0"?>
-<project name="vaadin-uitest" basedir="." default="publish-local"
- xmlns:ivy="antlib:org.apache.ivy.ant">
+<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>
@@ -11,8 +10,7 @@
<!-- 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" />
+ <property name="result.war" location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />
<path id="classpath.compile.custom">
</path>
@@ -22,12 +20,10 @@
to the source path -->
<ivy:resolve resolveid="common" conf="build, build-provided" />
- <ivy:cachepath pathid="classpath.compile.dependencies"
- conf="build, build-provided" />
+ <ivy:cachepath pathid="classpath.compile.dependencies" conf="build, build-provided" />
</target>
- <target name="compile" description="Compiles the module"
- depends="dependencies">
+ <target name="compile" description="Compiles the module" depends="dependencies">
<fail unless="module.name" message="No module name given" />
<property name="result.dir" location="result" />
@@ -37,21 +33,16 @@
<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">
+ <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" />
+ <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">
+ <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" />
@@ -60,8 +51,7 @@
</target>
<target name="testing-widgetset" depends="dependencies,compile">
- <property name="module"
- value="com.vaadin.tests.widgetset.TestingWidgetSet" />
+ <property name="module" value="com.vaadin.tests.widgetset.TestingWidgetSet" />
<property name="style" value="OBF" />
<property name="localWorkers" value="2" />
<property name="extraParams" value="" />
@@ -73,8 +63,7 @@
<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">
+ <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" />
@@ -109,8 +98,7 @@
<property name="src" location="${result.dir}/../src" />
<ivy:resolve resolveid="common" conf="build" />
- <ivy:cachepath pathid="classpath.runtime.dependencies"
- conf="build" />
+ <ivy:cachepath pathid="classpath.runtime.dependencies" conf="build" />
<delete dir="${deps.dir}" />
<mkdir dir="${deps.dir}" />
diff --git a/uitest/integration_tests.xml b/uitest/integration_tests.xml
index ba353dbdbb..fbe29c395d 100644
--- a/uitest/integration_tests.xml
+++ b/uitest/integration_tests.xml
@@ -1,21 +1,16 @@
<?xml version="1.0"?>
-<project xmlns:antcontrib="antlib:net.sf.antcontrib" name="Vaadin Integration Tests"
- basedir="." default="integration-test-all">
+<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" />
+ <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.server" message="test.integration.server must be set for integration tests to run" />
- <fail unless="test.integration.user"
- message="test.integration.user must be set for integration tests to run" />
- <fail unless="test.integration.antfile"
- message="test.integration.antfile must be set for integration tests to run" />
+ <fail unless="test.integration.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" />
@@ -39,28 +34,21 @@
<!-- 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}" />
+ <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" />
+ <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="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="test-output-dir" value="${integration_test.dir}/result/integration-test-output/${server-name}" />
<property name="retries" value="0" />
<fileset dir="." includes="test.xml" />
@@ -68,21 +56,16 @@
</target>
<target name="integration-test-push-servlet">
- <fileset dir="integration-testscripts" id="html-test-files"
- includes="integration-test-${server-name}-push-servlet.html" />
+ <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="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="test-output-dir" value="${integration_test.dir}/result/integration-test-output/${server-name}" />
<property name="retries" value="0" />
<fileset dir="." includes="test.xml" />
@@ -91,16 +74,12 @@
<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="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}" />
+ <property name="test-output-dir" value="${integration_test.dir}/result/integration-test-output/${server-name}" />
<fileset dir="." includes="test.xml" />
</subant>
@@ -108,30 +87,24 @@
<!-- 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" />
+ <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="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" />
+ <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" />
+ <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} deploy-to-GAE" />
</target>
@@ -224,8 +197,7 @@
<target name="integration-test-liferay6">
- <fileset dir="integration-testscripts" id="html-test-files"
- includes="Liferay-6/integration-test-liferay-6.0.5.html" />
+ <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">
@@ -236,14 +208,11 @@
</target>
<target name="integration-test-liferay6-theme">
- <fileset dir="integration-testscripts" id="html-test-files"
- includes="Liferay-6/Liferay6-and-6EE-theme-deploy.html" />
+ <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" />
+ <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">
@@ -254,8 +223,7 @@
</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" />
+ <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">
@@ -266,8 +234,7 @@
</target>
<target name="integration-test-liferay6ee">
- <fileset dir="integration-testscripts" id="html-test-files"
- includes="Liferay-6EE/integration-test-liferay-6ee.html" />
+ <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">
@@ -278,14 +245,11 @@
</target>
<target name="integration-test-liferay6ee-theme">
- <fileset dir="integration-testscripts" id="html-test-files"
- includes="Liferay-6/Liferay6-and-6EE-theme-deploy.html" />
+ <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" />
+ <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" />
@@ -295,8 +259,7 @@
</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" />
+ <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" />
@@ -306,8 +269,7 @@
</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" />
+ <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" />
@@ -342,8 +304,7 @@
<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" />
+ <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" />
@@ -362,8 +323,7 @@
<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" />
+ <fail unless="com.vaadin.testbench.screenshot.directory" message="You must define a com.vaadin.testbench.screenshot.directory parameter" />
<parallel>
<antcontrib:trycatch property="tried">
<try>
@@ -423,8 +383,7 @@
<antcontrib:if>
<isset property="startDelay" />
<then>
- <antcontrib:math result="sleepTime"
- datatype="int">
+ <antcontrib:math result="sleepTime" datatype="int">
<op op="rint">
<op op="*">
<num value="${startDelay}" />
@@ -438,8 +397,7 @@
</then>
</antcontrib:if>
- <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}"
- trust="yes" passphrase="${passphrase}">
+ <scp todir="${user}@${target-host}:." keyfile="${sshkey.file}" trust="yes" passphrase="${passphrase}">
<fileset dir="integration_base_files">
<include name="*" />
</fileset>
@@ -451,22 +409,16 @@
<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" />
+ <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}" />
+ <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" />
+ <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}" />
@@ -475,20 +427,15 @@
<fail message="${start-output}">
<condition>
<not>
- <contains string="${start-output}"
- substring="Demo deployed successfully" />
+ <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" />
+ <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}" />
+ <param name="deployment.url" value="http://${target-host}:${target-port}" />
</antcall>
<!-- Run theme tests in all browsers if there's a property
@@ -498,21 +445,16 @@
<antcontrib:then>
<antcall target="integration-test-theme">
<param name="server-name" value="${target-server}" />
- <param name="deployment.url"
- value="http://${target-host}:${target-port}" />
+ <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" />
+ <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}" />
+ <param name="deployment.url" value="http://${target-host}:${target-port}" />
</antcall>
<!-- Run theme tests in all browsers if there's a property
@@ -522,17 +464,13 @@
<antcontrib:then>
<antcall target="integration-test-theme">
<param name="server-name" value="${target-server}" />
- <param name="deployment.url"
- value="http://${target-host}:${target-port}" />
+ <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" />
+ <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}" />
@@ -545,9 +483,7 @@
</target>
<target name="echo-prefix">
- <antcontrib:propertyregex property="message-prefixed"
- input="${prefix}${message}" regexp="\n" replace="\0${prefix}"
- global="true" defaultValue="${prefix}${message}" />
+ <antcontrib:propertyregex property="message-prefixed" input="${prefix}${message}" regexp="\n" replace="\0${prefix}" global="true" defaultValue="${prefix}${message}" />
<echo message="${message-prefixed}" />
</target>
@@ -559,8 +495,7 @@
<antcall target="do-run-generic-test" />
</try>
<catch>
- <antcontrib:antcallback target="teamcity-escape"
- return="tried-escaped">
+ <antcontrib:antcallback target="teamcity-escape" return="tried-escaped">
<param name="returnTo" value="tried-escaped" />
<param name="message" value="${tried}" />
</antcontrib:antcallback>
@@ -580,15 +515,9 @@
<!-- 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}" />
+ <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>
@@ -601,8 +530,7 @@
<antcall target="integration-test-${target-server}" />
</try>
<catch>
- <antcallback target="teamcity-escape"
- return="tried-escaped">
+ <antcallback target="teamcity-escape" return="tried-escaped">
<param name="returnTo" value="tried-escaped" />
<param name="message" value="${tried}" />
</antcallback>
@@ -617,18 +545,15 @@
</target>
<target name="integration-test-get-lock">
- <sshexec host="${test.integration.server}" username="${user}"
- keyfile="${sshkey.file}" command="ant -f ${ant.hub} 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" />
+ <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" />
+ <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} clean" />
</target>
</project>
diff --git a/uitest/test.xml b/uitest/test.xml
index 44dac13d90..3baccb4117 100644
--- a/uitest/test.xml
+++ b/uitest/test.xml
@@ -1,6 +1,5 @@
<?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">
+<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}" />
@@ -9,12 +8,9 @@
<!-- 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-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}" />
@@ -22,26 +18,22 @@
<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." />
+ <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" />
+ <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.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" />
+ <fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" />
</path>
</target>
@@ -55,16 +47,13 @@
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." />
+ <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}" />
+ <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}" />
@@ -77,9 +66,7 @@
<!-- 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">
+ <javac includeantruntime="false" srcdir="${test-output-dir}" destdir="${class-dir}" debug="on" fork="yes" failonerror="false" encoding="UTF8">
<classpath>
<path refid="classpath" />
</classpath>
@@ -91,12 +78,9 @@
<!-- ================================================================== -->
<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." />
+ <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">
@@ -104,8 +88,7 @@
<include name="**/**.java" />
</fileset>
- <antcontrib:for threadCount="30" parallel="true"
- keepgoing="true" param="target">
+ <antcontrib:for threadCount="30" parallel="true" keepgoing="true" param="target">
<path>
<fileset refid="tests-fileset" />
</path>
@@ -128,32 +111,23 @@
<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}" />
+ <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}" />
+ <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="-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}" />
+ <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}" />
@@ -176,8 +150,7 @@
<target name="remove-error-screens">
<mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" />
<delete>
- <fileset
- dir="${com.vaadin.testbench.screenshot.directory}/errors">
+ <fileset dir="${com.vaadin.testbench.screenshot.directory}/errors">
<include name="**/**.*" />
</fileset>
</delete>
@@ -188,38 +161,29 @@
<!-- ================================================================== -->
<!-- The default target. -->
- <target name="run-and-clean-up"
- depends="check-parameters,remove-error-screens,run-tests" />
+ <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="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" />
+ <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" />
+ <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" />
+ <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>
diff --git a/uitest/vaadin-server.xml b/uitest/vaadin-server.xml
index 4b32cebe26..f2c3c60959 100644
--- a/uitest/vaadin-server.xml
+++ b/uitest/vaadin-server.xml
@@ -1,6 +1,5 @@
<?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=".">
+<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}" />
@@ -9,9 +8,7 @@
<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">
+ <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" />
@@ -28,8 +25,7 @@
<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">
+ <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" />