summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2017-02-01 17:17:15 +0200
committerHenri Sara <henri.sara@gmail.com>2017-02-01 17:17:15 +0200
commit53674a7cafc22e8e21f5a7d46df0f5c126fb76c6 (patch)
tree7bb8916c2b891808e78ca95f0ae150e9b03060cc /uitest
parent8e20ab0f05603cb81a8bdbf456f63c9a49eb1d3b (diff)
downloadvaadin-framework-53674a7cafc22e8e21f5a7d46df0f5c126fb76c6.tar.gz
vaadin-framework-53674a7cafc22e8e21f5a7d46df0f5c126fb76c6.zip
Refactor testing of the framework (#8393)
* Integration tests moved from uitest to separate test modules * Run TB4 tests with maven profile * Remove old ant/ivy build scripts from uitest * Add 'needs-ssh' test category for reconnection test * Add default values for testing and validation builds * Add placeholder build.xml with instructions to run Maven
Diffstat (limited to 'uitest')
-rw-r--r--uitest/build.xml96
-rw-r--r--uitest/integration_base_files/base.xml144
-rw-r--r--uitest/integration_base_files/cleanup.sh26
-rw-r--r--uitest/integration_base_files/lock_age.sh21
-rw-r--r--uitest/integration_tests.xml330
-rw-r--r--uitest/ivy.xml134
-rw-r--r--uitest/pom.xml168
-rw-r--r--uitest/src/main/webapp/WEB-INF/jboss-web.xml7
-rw-r--r--uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java2
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java56
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java81
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java107
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java32
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java20
-rw-r--r--uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java21
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java84
-rw-r--r--uitest/tb3test.xml55
-rw-r--r--uitest/vaadin-server.xml34
21 files changed, 114 insertions, 1367 deletions
diff --git a/uitest/build.xml b/uitest/build.xml
index 6a40f8e539..8dbf659383 100644
--- a/uitest/build.xml
+++ b/uitest/build.xml
@@ -1,97 +1,7 @@
-<?xml version="1.0"?>
+<project>
-<project name="vaadin-uitest" basedir="." default="test-tb3"
- xmlns:ivy="antlib:org.apache.ivy.ant">
- <description>
- Provides a uitest WAR containing Vaadin UI tests
- </description>
- <include file="../common.xml" as="common" />
-
- <!-- global properties -->
- <property name="module.name" value="vaadin-uitest" />
- <property name="uitest.dir" location="${vaadin.basedir}/uitest" />
- <property name="result.dir" value="result" />
- <property name="theme.result.dir" value="${result.dir}/VAADIN/themes" />
- <property name="result.war"
- location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />
-
- <!-- Need to give a default value to keep Ivy happy -->
- <property name="vaadin.build.repository" value="http://maven.vaadin.com/vaadin-prereleases"/>
-
- <target name="clean">
- <fail unless="result.dir" message="No result.dir parameter given" />
- <delete dir="${result.dir}" />
- </target>
-
- <target name="fetch-war">
- <mkdir dir="${vaadin.basedir}/uitest/target"/>
- <get src="${vaadin.build.repository}/com/vaadin/vaadin-uitest/${vaadin.version}/vaadin-uitest-${vaadin.version}.war" dest="${vaadin.basedir}/uitest/target/vaadin-uitest-${vaadin.version}.war"/>
- </target>
-
- <!-- run both normal and server tests -->
- <target name="test-all" depends="clean-testbench-errors">
- <property name="war.file"
- location="${vaadin.basedir}/uitest/target/vaadin-uitest-${vaadin.version}.war" />
- <mkdir dir="${vaadin.basedir}/result" />
- <parallel>
- <daemons>
- <ant antfile="${uitest.dir}/vaadin-server.xml"
- inheritall="true" inheritrefs="true" target="deploy-and-start" />
- </daemons>
- <sequential>
- <ant antfile="${uitest.dir}/vaadin-server.xml"
- target="wait-for-startup" />
- <ant antfile="${uitest.dir}/tb3test.xml" target="run-all-tb3-tests"
- inheritall="true" />
- <!-- within sequential for now not to cause problems with result parsing in CI -->
- <ant antfile="${uitest.dir}/integration_tests.xml"
- target="integration-test-all" inheritall="false"
- inheritrefs="false">
- <property name="demo.war" value="${war.file}" />
- </ant>
- </sequential>
- </parallel>
+ <target name="test-tb3">
+ <echo>This Ant script is no longer used to test the framework. Run `mvn verify -P test` to execute browser tests.</echo>
</target>
- <target name="test-server" depends="clean-testbench-errors">
- <property name="war.file"
- location="${vaadin.basedir}/uitest/target/vaadin-uitest-${vaadin.version}.war" />
- <ant antfile="${uitest.dir}/integration_tests.xml"
- target="integration-test-all" inheritall="false"
- inheritrefs="false">
- <property name="demo.war" value="${war.file}" />
- </ant>
- </target>
-
- <target name="test-tb3" depends="clean-testbench-errors">
- <property name="war.file"
- location="${vaadin.basedir}/uitest/target/vaadin-uitest-${vaadin.version}.war" />
- <mkdir dir="${vaadin.basedir}/result" />
- <parallel>
- <daemons>
- <ant antfile="${uitest.dir}/vaadin-server.xml"
- inheritall="true" inheritrefs="true" target="deploy-and-start" />
- </daemons>
- <sequential>
- <ant antfile="${uitest.dir}/vaadin-server.xml"
- target="wait-for-startup" />
- <ant antfile="${uitest.dir}/tb3test.xml" target="run-all-tb3-tests"
- inheritall="true" />
- </sequential>
- </parallel>
- </target>
-
- <target name="clean-testbench-errors">
- <fail unless="com.vaadin.testbench.screenshot.directory"
- message="Define screenshot directory using -Dcom.vaadin.testbench.screenshot.directory" />
- <mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" />
- <delete>
- <fileset
- dir="${com.vaadin.testbench.screenshot.directory}/errors">
- <include name="*" />
- </fileset>
- </delete>
- </target>
-
-
</project>
diff --git a/uitest/integration_base_files/base.xml b/uitest/integration_base_files/base.xml
deleted file mode 100644
index f2064c3007..0000000000
--- a/uitest/integration_base_files/base.xml
+++ /dev/null
@@ -1,144 +0,0 @@
-<?xml version="1.0"?>
-<project name="test" basedir=".">
- <property file="deploy.properties" />
- <property name="vaadin.major.7" value="1" />
- <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" />
-
-
- <target name="afterDeploy">
- <!-- Empty default -->
- </target>
-
- <target name="beforeDeploy">
- <!-- 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="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_base_files/cleanup.sh b/uitest/integration_base_files/cleanup.sh
deleted file mode 100644
index 42fb5a434d..0000000000
--- a/uitest/integration_base_files/cleanup.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/bash
-echo checking and killing open servers
-
-# Find all java processes, except
-# * grep, as we're running it
-# * get-lock, as that one is just waiting for this cleanup to happen
-# * shutdown-and-cleanup, as that could be the one we're running from
-ps x | grep -E bin/java | grep -v grep | grep -v get-lock | grep -v shutdown-and-cleanup | awk '{print $1}' > temp
-
-#Read and kill processes marked to temp
-while read line
-do
- kill -9 $line
-done < temp
-
-#Remove temp
-rm temp
-
-if [ -a /home/integration/demo.war ]
- then
- echo removing old demo.war
- rm /home/integration/demo.war
-fi
-
-echo Cleaning deploy dir
-rm -rf /home/integration/deploy/*
diff --git a/uitest/integration_base_files/lock_age.sh b/uitest/integration_base_files/lock_age.sh
deleted file mode 100644
index 115a8fef79..0000000000
--- a/uitest/integration_base_files/lock_age.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/bash
-if lockfile -r0 -! /home/integration/deploy/lock.file &> /dev/null
- then
- # If we could not get the lock, check how old the lock file is
- DATE=$(date +%s)
- # What if the file is not there any more?
- LOCK_AGE=$(stat -c %Z /home/integration/deploy/lock.file)
-
- AGE=$[($DATE - $LOCK_AGE)/60]
-
- if [ "$AGE" -gt "20" ]
- then
- echo lock.file is $AGE min old.
- ./cleanup.sh
-# else
-# echo lock.file is $AGE min old.
- fi
- else
- # If we got the lock, do a cleanup (releasing the lock) just in case something has still been left running
- ./cleanup.sh &> /dev/null
-fi
diff --git a/uitest/integration_tests.xml b/uitest/integration_tests.xml
deleted file mode 100644
index 818c0095b6..0000000000
--- a/uitest/integration_tests.xml
+++ /dev/null
@@ -1,330 +0,0 @@
-<?xml version="1.0"?>
-
-<project xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant" 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" />
-
- <!-- TestBench license parameter -->
- <property name="vaadin.testbench.developer.license" value="" />
-
- <property name="report.dir" location="${integration_test.dir}/result/reports-integration" />
-
- <!-- ssh host values -->
- <property name="ant.hub" value="${test.integration.antfile}" />
- <property name="user" value="${test.integration.user}" />
- <property name="passphrase" value="" />
-
- <ivy:resolve file="ivy.xml" conf="build, build-provided" />
- <ivy:cachepath pathid="classpath.tb3.lib" conf="build, build-provided" />
- <path id="classpath.tb3">
- <path location="target/test-classes" />
- <path refid="classpath.tb3.lib" />
- <path location="target/classes" />
- </path>
-
- <!-- 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>
-
- <target name="run-tb3-servlet-test">
- <antcall target="run-tb3-test" inheritall="true">
- <param name="junit.test.suite" value="com.vaadin.tests.tb3.ServletIntegrationTests" />
- </antcall>
- </target>
- <target name="run-tb3-test">
- <fail unless="server-name" message="Server name must be defined in server-name" />
- <fail unless="deployment.url" message="Deplyoment url must be defined in deployment.url" />
- <fail unless="com.vaadin.testbench.screenshot.directory" message="Screenshot directory must be defined in com.vaadin.testbench.screenshot.directory" />
- <property name="server.report.dir" location="${report.dir}/integration-test-tb3/${server-name}" />
- <!-- The junit task does not create the report dir... -->
- <mkdir dir="${server.report.dir}" />
-
- <junit showoutput="no" printsummary="no" fork="yes">
- <formatter type="xml" />
- <classpath refid="classpath.tb3" />
-
- <jvmarg value="-Dcom.vaadin.testbench.screenshot.directory=${com.vaadin.testbench.screenshot.directory}" />
- <jvmarg value="-Ddeployment.url=${deployment.url}" />
- <jvmarg value="-Dserver-name=${server-name}" />
- <jvmarg value="-Djava.awt.headless=true" />
- <jvmarg value="-Ddemo.war=${demo.war}" />
- <jvmarg value="-Dvaadin.testbench.developer.license=${vaadin.testbench.developer.license}" />
- <test name="${junit.test.suite}" todir="${server.report.dir}" />
- </junit>
- </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-tomcat7apacheproxy">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="tomcat7apacheproxy" />
- </antcall>
- </target>
- <target name="integration-test-tomcat8">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="tomcat8" />
- </antcall>
- </target>
-
- <target name="integration-test-osgi">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="karaf4" />
- </antcall>
- </target>
-
- <target name="integration-test-jetty8">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="90" />
- <param name="target-server" value="jetty8" />
- </antcall>
- </target>
-
- <target name="integration-test-jetty9">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="90" />
- <param name="target-server" value="jetty9" />
- </antcall>
- </target>
-
- <target name="integration-test-jboss-eap6">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="jbosseap6" />
- </antcall>
- </target>
- <target name="integration-test-wildfly8">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="wildfly8" />
- </antcall>
- </target>
- <target name="integration-test-wildfly9">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="wildfly9" />
- </antcall>
- </target>
- <target name="integration-test-wildfly10">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="wildfly10" />
- </antcall>
- </target>
- <target name="integration-test-wildfly9-nginx">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="wildfly9-nginx" />
- <param name="target-port" value="80" />
- </antcall>
- </target>
- <target name="integration-test-glassfish4">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="glassfish4" />
- </antcall>
- </target>
- <target name="integration-test-payara">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="10" />
- <param name="target-server" value="payara" />
- </antcall>
- </target>
-
-
- <target name="integration-test-weblogic12">
- <antcall target="run-generic-integration-test">
- <param name="startDelay" value="60" />
- <param name="target-port" value="7001" />
- <param name="target-server" value="weblogic12" />
- </antcall>
- </target>
-
-
- <!-- Upload demo, clean error screenshots and test deployment on all
- servers -->
- <target name="integration-test-all" unless="tests.integration.skip">
- <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" />
- <delete dir="${report.dir}" />
- <mkdir dir="${report.dir}" />
-
- <parallel>
- <antcall target="integration-test-weblogic12" />
- <antcall target="integration-test-glassfish4" />
- <antcall target="integration-test-payara" />
- <antcall target="integration-test-jboss-eap6" />
- <antcall target="integration-test-wildfly8" />
- <antcall target="integration-test-wildfly9" />
- <antcall target="integration-test-wildfly10" />
- <antcall target="integration-test-jetty8" />
- <antcall target="integration-test-jetty9" />
- <antcall target="integration-test-tomcat7" />
- <antcall target="integration-test-tomcat8" />
- <antcall target="integration-test-osgi" />
- <antcall target="integration-test-tomcat7apacheproxy" />
- </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>
- <echo>Delaying startup of ${target-server} with ${startDelay} seconds</echo>
- <sleep seconds="${startDelay}" />
- </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>
-
- <echo>Starting TB3 test for ${target-server}</echo>
- <antcall target="run-tb3-servlet-test">
- <param name="server-name" value="${target-server}" />
- <param name="deployment.url" value="http://${target-host}:${target-port}" />
- </antcall>
-
- <!-- 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
deleted file mode 100644
index 33ac7c7c04..0000000000
--- a/uitest/ivy.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE ivy-module [
- <!ENTITY jetty.version "8.1.12.v20130726">
-]>
-<ivy-module version="2.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
- xmlns:m="http://ant.apache.org/ivy/maven">
-
- <info organisation="com.vaadin" module="vaadin-uitest"
- revision="${vaadin.version}" />
-
- <configurations>
- <conf name="build" />
- <conf name="build-provided" visibility="private" />
- <conf name="jetty-run" visibility="private" />
- </configurations>
- <dependencies defaultconf="build" defaultconfmapping="build->default">
- <!-- API DEPENDENCIES -->
- <dependency org="javax.portlet" name="portlet-api"
- rev="2.0" conf="build-provided -> default" />
-
- <dependency org="javax.validation" name="validation-api"
- rev="1.0.0.GA" conf="build -> default,sources" />
- <dependency org="org.hibernate" name="hibernate-validator"
- rev="4.2.0.Final" conf="build -> default" />
-
- <!-- LIBRARY DEPENDENCIES (compile time) -->
- <!-- Project modules -->
- <dependency org="com.vaadin" name="vaadin-uitest-common"
- rev="${vaadin.version}" conf="build->default">
- <exclude type="pom" />
- </dependency>
- <dependency org="com.vaadin" name="vaadin-server"
- rev="${vaadin.version}" conf="build->default">
- <exclude org="javax.servlet"></exclude>
- <exclude type="pom" />
- </dependency>
- <dependency org="com.vaadin" name="vaadin-compatibility-server"
- rev="${vaadin.version}" conf="build->default">
- <exclude org="javax.servlet"></exclude>
- <exclude type="pom" />
- </dependency>
- <dependency org="com.vaadin" name="vaadin-client"
- rev="${vaadin.version}" conf="build->default">
- <exclude org="javax.validation"></exclude>
- <exclude type="pom" />
- </dependency>
- <dependency org="com.vaadin" name="vaadin-compatibility-client"
- rev="${vaadin.version}" conf="build->default">
- <exclude org="javax.validation"></exclude>
- <exclude type="pom" />
- </dependency>
- <dependency org="com.vaadin" name="vaadin-client-compiled"
- rev="${vaadin.version}" conf="build->default">
- <exclude type="pom" />
- </dependency>
- <dependency org="com.vaadin" name="vaadin-compatibility-client-compiled"
- rev="${vaadin.version}" conf="build->default">
- <exclude type="pom" />
- </dependency>
- <dependency org="com.vaadin" name="vaadin-themes"
- rev="${vaadin.version}" conf="build->default">
- <exclude type="pom" />
- </dependency>
- <dependency org="com.vaadin" name="vaadin-push" rev="${vaadin.version}"
- conf="build->default">
- <exclude org="javax.servlet"></exclude>
- <exclude type="pom" />
- </dependency>
-
- <!-- For compiling TestingWidgetSet -->
- <dependency org="com.vaadin" name="vaadin-client-compiler"
- rev="${vaadin.version}" conf="build-provided-> default">
- <exclude type="pom" />
- </dependency>
-
- <!-- Servlet 3.0 API -->
- <dependency org="javax.servlet" name="javax.servlet-api"
- rev="3.0.1" conf="build-provided -> default" />
-
- <dependency org="org.eclipse.jetty" name="jetty-server"
- rev="&jetty.version;" conf="build-provided, jetty-run->default">
- <exclude org="org.eclipse.jetty.orbit"></exclude>
- </dependency>
- <!-- jetty-servlets needed by ProxyTest, but not by jetty-runner -->
- <dependency org="org.eclipse.jetty" name="jetty-servlets"
- rev="&jetty.version;" conf="build-provided, jetty-run->default">
- <exclude org="org.eclipse.jetty.orbit"></exclude>
- </dependency>
- <dependency org="org.eclipse.jetty" name="jetty-websocket"
- rev="&jetty.version;" conf="build-provided, jetty-run->default">
- <exclude org="org.eclipse.jetty.orbit"></exclude>
- </dependency>
- <dependency org="org.eclipse.jetty" name="jetty-webapp"
- rev="&jetty.version;" conf="build-provided, jetty-run->default">
- <exclude org="org.eclipse.jetty.orbit"></exclude>
- </dependency>
- <dependency org="org.eclipse.jetty" name="jetty-util"
- rev="&jetty.version;" conf="build-provided, jetty-run->default">
- <exclude org="org.eclipse.jetty.orbit"></exclude>
- </dependency>
- <dependency org="org.mortbay.jetty" name="jetty-runner"
- rev="&jetty.version;" conf="build-provided, jetty-run->default">
- <exclude org="org.eclipse.jetty.orbit"></exclude>
- </dependency>
-
- <dependency org="junit" name="junit" rev="4.12"
- conf="build -> default" />
- <dependency org="org.hamcrest" name="hamcrest-all"
- rev="1.3" conf="build->default" />
- <dependency org="com.jcraft" name="jsch" rev="0.1.52"
- conf="build->default" />
- <dependency org="commons-codec" name="commons-codec"
- rev="1.5" conf="build->default" />
- <dependency org="commons-io" name="commons-io"
- rev="${commons-io.version}" conf="build->default" />
- <!-- Mainly for SQLContainer tests -->
- <dependency org="org.hsqldb" name="hsqldb" rev="2.2.6"
- conf="build -> default" />
- <dependency org="com.vaadin" name="vaadin-testbench-api"
- rev="${vaadin.version}" conf="build-provided -> default" />
- <!-- This should be removed once tests have been updated to use lang3 -->
- <dependency org="commons-lang" name="commons-lang"
- rev="2.6" conf="build -> default" />
-
- <dependency org="org.eclipse.jgit" name="org.eclipse.jgit"
- rev="3.5.1.201410131835-r" conf="build->default">
- <exclude org="org.apache.httpcomponents"></exclude>
- </dependency>
-
- </dependencies>
-
-</ivy-module>
diff --git a/uitest/pom.xml b/uitest/pom.xml
index 84eeb9566d..ac7fe17758 100644
--- a/uitest/pom.xml
+++ b/uitest/pom.xml
@@ -12,6 +12,7 @@
<packaging>war</packaging>
<properties>
<skip.uitest.deployment>true</skip.uitest.deployment>
+ <skip.uitest.failsafe>true</skip.uitest.failsafe>
<!-- Don't care about coding style for tests -->
<sonar.skip>true</sonar.skip>
</properties>
@@ -260,6 +261,24 @@
</plugin>
<plugin>
+ <groupId>com.github.klieber</groupId>
+ <artifactId>phantomjs-maven-plugin</artifactId>
+ <configuration>
+ <skip>${skip.uitest.failsafe}</skip>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ <configuration>
+ <version>${phantomjs.version}</version>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
@@ -267,6 +286,10 @@
<httpConnector>
<port>8888</port>
</httpConnector>
+ <scanIntervalSeconds>-1</scanIntervalSeconds>
+ <stopPort>8889</stopPort>
+ <stopWait>5</stopWait>
+ <stopKey>foo</stopKey>
</configuration>
</plugin>
@@ -283,18 +306,39 @@
</configuration>
</plugin>
<plugin>
- <artifactId>maven-surefire-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>animal-sniffer-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>animal-sniffer-maven-plugin</artifactId>
+ <artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <skip>${skip.uitest.failsafe}</skip>
+ <includes>
+ <include>**/AllTB3Tests.java</include>
+ </includes>
+ <systemPropertyVariables>
+ <com.vaadin.testbench.screenshot.directory>${project.parent.basedir}/tests/screenshots</com.vaadin.testbench.screenshot.directory>
+ <com.vaadin.testbench.max.retries>2</com.vaadin.testbench.max.retries>
+ </systemPropertyVariables>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
<pluginManagement>
<plugins>
@@ -327,20 +371,43 @@
</properties>
</profile>
<profile>
- <id>default</id>
+ <id>test</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <activeByDefault>false</activeByDefault>
</activation>
+ <properties>
+ <skip.uitest.failsafe>false</skip.uitest.failsafe>
+ </properties>
<build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludedGroups>com.vaadin.testcategory.MeasurementTest</excludedGroups>
- </configuration>
- </plugin>
- </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-maven-plugin</artifactId>
+
+ <executions>
+ <!-- start and stop jetty (running our app)
+ when running integration tests -->
+ <execution>
+ <id>start-jetty</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop-jetty</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
+
</profile>
<profile>
<id>measurements</id>
@@ -369,54 +436,39 @@
</systemPropertyVariables>
</configuration>
</plugin>
- <plugin>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-maven-plugin</artifactId>
- <configuration>
- <httpConnector>
- <port>8888</port>
- </httpConnector>
- <scanIntervalSeconds>-1</scanIntervalSeconds>
- <stopPort>8081</stopPort>
- <stopWait>5</stopWait>
- <stopKey>foo</stopKey>
- </configuration>
- <executions>
- <!-- start and stop jetty (running our app) when
- running integration tests -->
- <execution>
- <id>start-jetty</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-jetty</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>com.github.klieber</groupId>
- <artifactId>phantomjs-maven-plugin</artifactId>
- <executions>
- <execution>
- <goals>
- <goal>install</goal>
- </goals>
- <configuration>
- <version>${phantomjs.version}</version>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
</profile>
+ <profile>
+ <id>validation</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <useLocalWebDriver>true</useLocalWebDriver>
+ <browsers.include>phantomjs1</browsers.include>
+ <categories.exclude>push,needs-ssh</categories.exclude>
+ </systemPropertyVariables>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
</profiles>
</project>
diff --git a/uitest/src/main/webapp/WEB-INF/jboss-web.xml b/uitest/src/main/webapp/WEB-INF/jboss-web.xml
deleted file mode 100644
index 12548b7c5c..0000000000
--- a/uitest/src/main/webapp/WEB-INF/jboss-web.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<jboss-web version="7.2" xmlns="http://www.jboss.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
- schema/jboss-web_7_2.xsd">
- <!-- Enable websockets on JBoss EAP 6.4 -->
- <enable-websockets>true</enable-websockets>
-</jboss-web>
diff --git a/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java b/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java
index e733bf0d2e..3cbf8c38c7 100644
--- a/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java
+++ b/uitest/src/test/java/com/vaadin/tests/application/ReconnectDialogUITest.java
@@ -27,7 +27,7 @@ import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.testbench.parallel.TestCategory;
import com.vaadin.tests.tb3.MultiBrowserTestWithProxy;
-@TestCategory("communication")
+@TestCategory("needs-ssh")
public class ReconnectDialogUITest extends MultiBrowserTestWithProxy {
@Test
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java b/uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java
deleted file mode 100644
index da0d6cb08e..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/AbstractIntegrationTest.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-import com.vaadin.testbench.By;
-import com.vaadin.testbench.elements.UIElement;
-import com.vaadin.testbench.parallel.TestNameSuffix;
-import com.vaadin.tests.tb3.SingleBrowserTestPhantomJS2;
-
-/**
- * Base class for integration tests. Integration tests use the
- * {@literal deployment.url} parameter to determine the base deployment url
- * (http://hostname:123)
- *
- * @author Vaadin Ltd
- */
-@TestNameSuffix(property = "server-name")
-public abstract class AbstractIntegrationTest
- extends SingleBrowserTestPhantomJS2 {
- @Override
- protected String getBaseURL() {
- String deploymentUrl = System.getProperty("deployment.url");
- if (deploymentUrl == null || deploymentUrl.equals("")) {
- throw new RuntimeException(
- "Deployment url must be given as deployment.url");
- }
- return deploymentUrl;
- }
-
- @Override
- protected void openTestURL() {
- super.openTestURL();
-
- waitForApplication();
- }
-
- protected void waitForApplication() {
- if (!isElementPresent(UIElement.class)) {
- // Wait for UI element.
- waitForElementPresent(By.vaadin("//com.vaadin.ui.UI"));
- }
- }
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java b/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
deleted file mode 100644
index a8f291d79d..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/AbstractServletIntegrationTest.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameters;
-
-import com.vaadin.testbench.elements.TableElement;
-import com.vaadin.tests.tb3.ParameterizedTB3Runner;
-
-/**
- * Base class for servlet integration tests. Automatically prepends "/demo" to
- * the deployment path
- *
- * @author Vaadin Ltd
- */
-@RunWith(ParameterizedTB3Runner.class)
-public abstract class AbstractServletIntegrationTest
- extends AbstractIntegrationTest {
-
- private String contextPath = "/demo";
-
- @Test
- public void runTest() throws IOException, AssertionError {
- openTestURL();
- // make sure no fading progress indicator from table update is lingering
- sleep(2000);
- compareScreen("initial");
- $(TableElement.class).first().getCell(0, 1).click();
- // without this, table fetch might have a fading progress indicator
- sleep(2000);
- compareScreen("finland");
- }
-
- @Override
- protected String getDeploymentPath(Class<?> uiClass) {
- return contextPath + super.getDeploymentPath(uiClass);
- }
-
- public void setContextPath(String contextPath) {
- this.contextPath = contextPath;
- }
-
- @Parameters
- public static Collection<String> getContextPaths() {
- if (getServerName().equals("wildfly9-nginx")) {
- ArrayList<String> paths = new ArrayList<>();
- paths.add("/buffering/demo");
- paths.add("/nonbuffering/demo");
- paths.add("/buffering-timeout/demo");
- paths.add("/nonbuffering-timeout/demo");
- return paths;
- } else {
- return Collections.emptyList();
- }
- }
-
- protected static String getServerName() {
- return System.getProperty("server-name");
- }
-
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java b/uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java
deleted file mode 100644
index 7a86ff4cba..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/LongPollingProxyServerTest.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.remote.DesiredCapabilities;
-import org.openqa.selenium.support.ui.ExpectedCondition;
-
-import com.vaadin.testbench.parallel.Browser;
-import com.vaadin.tests.push.BasicPushLongPolling;
-import com.vaadin.tests.push.BasicPushTest;
-import com.vaadin.tests.tb3.IncludeIfProperty;
-
-@IncludeIfProperty(property = "server-name", value = "wildfly9-nginx")
-public class LongPollingProxyServerTest extends AbstractIntegrationTest {
-
- @Override
- protected Class<?> getUIClass() {
- return BasicPushLongPolling.class;
- }
-
- @Test
- public void bufferingTimeoutBasicPush() throws Exception {
- basicPush("buffering-timeout");
- }
-
- @Test
- public void nonbufferingTimeoutBasicPush() throws Exception {
- basicPush("nonbuffering-timeout");
- }
-
- @Test
- public void bufferingBasicPush() throws Exception {
- basicPush("buffering");
- }
-
- @Test
- public void nonbufferingBasicPush() throws Exception {
- basicPush("nonbuffering");
- }
-
- @Test
- public void bufferingTimeoutActionAfterFirstTimeout() throws Exception {
- actionAfterFirstTimeout("buffering-timeout");
- }
-
- @Test
- public void nonbufferingTimeoutActionAfterFirstTimeout() throws Exception {
- actionAfterFirstTimeout("nonbuffering-timeout");
- }
-
- private String getUrl(String bufferingOrNot) {
- return getBaseURL() + "/" + bufferingOrNot + "/demo"
- + getDeploymentPath();
- }
-
- private void actionAfterFirstTimeout(String bufferingOrNot)
- throws Exception {
- String url = getUrl(bufferingOrNot);
- getDriver().get(url);
- // The wildfly9-nginx server has a configured timeout of 10s for
- // *-timeout urls
- Thread.sleep(15000);
- Assert.assertEquals(0, BasicPushTest.getClientCounter(this));
- BasicPushTest.getIncrementButton(this).click();
- Assert.assertEquals(1, BasicPushTest.getClientCounter(this));
- }
-
- private void basicPush(String bufferingOrNot) throws Exception {
- String url = getUrl(bufferingOrNot);
- getDriver().get(url);
-
- Assert.assertEquals(0, BasicPushTest.getServerCounter(this));
- BasicPushTest.getServerCounterStartButton(this).click();
- waitUntil(new ExpectedCondition<Boolean>() {
- @Override
- public Boolean apply(WebDriver input) {
- return BasicPushTest
- .getServerCounter(LongPollingProxyServerTest.this) > 1;
- }
- });
- }
-
- @Override
- public List<DesiredCapabilities> getBrowsersToTest() {
- return Collections
- .singletonList(Browser.PHANTOMJS.getDesiredCapabilities());
- }
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java
deleted file mode 100644
index 20c17a3424..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationDefaultPushUITest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-public class ServletIntegrationDefaultPushUITest
- extends AbstractServletIntegrationTest {
- // Uses the test method declared in the super class
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java
deleted file mode 100644
index 32338e2c37..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationJSR356WebsocketUITest.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-public class ServletIntegrationJSR356WebsocketUITest
- extends AbstractServletIntegrationTest {
- // Uses the test method declared in the super class
-
- @Override
- protected String getDeploymentPath(Class<?> uiClass) {
- return super.getDeploymentPath(uiClass).replace("/run/",
- "/run-jsr356/");
- }
-
- @Override
- protected Class<?> getUIClass() {
- return ServletIntegrationWebsocketUI.class;
- }
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java
deleted file mode 100644
index 06f51de57d..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationLongPollingUITest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-public class ServletIntegrationLongPollingUITest
- extends AbstractServletIntegrationTest {
- // Uses the test method declared in the super class
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java
deleted file mode 100644
index 29d5afc06f..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationStreamingUITest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-public class ServletIntegrationStreamingUITest
- extends AbstractServletIntegrationTest {
- // Uses the test method declared in the super class
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java
deleted file mode 100644
index 16c3c24685..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationUITest.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-public class ServletIntegrationUITest extends AbstractServletIntegrationTest {
- // Uses the test method declared in the super class
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java b/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java
deleted file mode 100644
index 204b1e29b3..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/integration/ServletIntegrationWebsocketUITest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-package com.vaadin.tests.integration;
-
-public class ServletIntegrationWebsocketUITest
- extends AbstractServletIntegrationTest {
- // Uses the test method declared in the super class
-}
diff --git a/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java b/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
deleted file mode 100644
index 9698068621..0000000000
--- a/uitest/src/test/java/com/vaadin/tests/tb3/ServletIntegrationTests.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright 2000-2016 Vaadin Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package com.vaadin.tests.tb3;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.model.InitializationError;
-
-import com.vaadin.tests.integration.AbstractIntegrationTest;
-import com.vaadin.tests.integration.ServletIntegrationJSR356WebsocketUITest;
-import com.vaadin.tests.integration.ServletIntegrationWebsocketUITest;
-import com.vaadin.tests.tb3.ServletIntegrationTests.ServletIntegrationTestSuite;
-
-@RunWith(ServletIntegrationTestSuite.class)
-public class ServletIntegrationTests {
-
- public static Set<String> notJSR356Compatible = new HashSet<>();
- public static Set<String> notWebsocketCompatible = new HashSet<>();
- static {
-
- notJSR356Compatible.add("jetty8");
- notJSR356Compatible.add("tomcat7");
- notJSR356Compatible.add("tomcat7apacheproxy");
-
- notWebsocketCompatible.add("tomcat7apacheproxy");
- notWebsocketCompatible.add("weblogic10");
- notWebsocketCompatible.add("wildfly9-nginx");
-
- // Jetty 9 but no ws support by default
- notWebsocketCompatible.add("karaf4");
-
- // If a server does not support any kind of websockets it does not
- // support JSR-356 either..
- notJSR356Compatible.addAll(notWebsocketCompatible);
- }
-
- public static class ServletIntegrationTestSuite extends TB3TestSuite {
- public ServletIntegrationTestSuite(Class<?> klass)
- throws InitializationError, IOException {
- super(klass, AbstractIntegrationTest.class,
- "com.vaadin.tests.integration", new String[] {},
- new ServletTestLocator());
- }
- }
-
- public static class ServletTestLocator extends TB3TestLocator {
- @Override
- protected <T> List<Class<? extends T>> findClasses(Class<T> baseClass,
- String basePackage, String[] ignoredPackages)
- throws IOException {
- List<Class<? extends T>> allClasses = super.findClasses(baseClass,
- basePackage, ignoredPackages);
- String serverName = System.getProperty("server-name");
-
- if (notJSR356Compatible.contains(serverName)) {
- allClasses
- .remove(ServletIntegrationJSR356WebsocketUITest.class);
- }
-
- if (notWebsocketCompatible.contains(serverName)) {
- allClasses.remove(ServletIntegrationWebsocketUITest.class);
- }
- return allClasses;
- }
- }
-}
diff --git a/uitest/tb3test.xml b/uitest/tb3test.xml
deleted file mode 100644
index 1e4eb02d4e..0000000000
--- a/uitest/tb3test.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<project name="tb3test" xmlns:antcontrib="antlib:net.sf.antcontrib" xmlns:ivy="antlib:org.apache.ivy.ant" basedir=".">
-
- <dirname property="tb3test.dir" file="${ant.file.tb3test}" />
- <property name="report.dir" location="${tb3test.dir}/result/reports-tb3" />
- <property name="browsers.include" value="" />
- <property name="browsers.exclude" value="" />
- <property name="browser.factory" value="" />
- <property name="categories.include" value="" />
- <property name="categories.exclude" value="" />
- <property name="useLocalWebDriver" value="false" />
- <property name="com.vaadin.testbench.max.retries" value="0" />
- <property name="com.vaadin.testbench.hub.url" value="" />
- <property name="vaadin.testbench.developer.license" value="" />
- <property name="junit.test.suite" value="com.vaadin.tests.tb3.AllTB3Tests" />
-
- <ivy:resolve file="${tb3test.dir}/ivy.xml" conf="build, build-provided" />
- <ivy:cachepath pathid="classpath.tb3.lib" conf="build, build-provided" />
- <path id="classpath.tb3">
- <path location="${tb3test.dir}/target/test-classes" />
- <path refid="classpath.tb3.lib" />
- <path location="${tb3test.dir}/target/classes" />
- </path>
-
- <target name="run-all-tb3-tests" unless="tests.tb3.skip"
- description="Run all the TB3 tests (except server tests) in the project">
- <antcall target="run-tb3-suite" />
- </target>
-
- <target name="run-tb3-suite">
- <fail unless="com.vaadin.testbench.screenshot.directory" message="Define screenshot directory using -Dcom.vaadin.testbench.screenshot.directory" />
- <delete dir="${report.dir}" />
- <mkdir dir="${report.dir}" />
-
- <junit showoutput="no" printsummary="no" fork="yes">
- <formatter type="xml" />
- <classpath refid="classpath.tb3" />
-
- <jvmarg value="-Dcom.vaadin.testbench.screenshot.directory=${com.vaadin.testbench.screenshot.directory}" />
- <jvmarg value="-Djava.awt.headless=true" />
- <jvmarg value="-Dbrowsers.include=${browsers.include}" />
- <jvmarg value="-Dbrowsers.exclude=${browsers.exclude}" />
- <jvmarg value="-Dbrowser.factory=${browser.factory}" />
- <jvmarg value="-Dcategories.include=${categories.include}" />
- <jvmarg value="-Dcategories.exclude=${categories.exclude}" />
- <jvmarg value="-DuseLocalWebDriver=${useLocalWebDriver}" />
- <jvmarg value="-Dcom.vaadin.testbench.max.retries=${com.vaadin.testbench.max.retries}" />
- <jvmarg value="-Dcom.vaadin.testbench.hub.url=${com.vaadin.testbench.hub.url}" />
- <jvmarg value="-Dvaadin.testbench.developer.license=${vaadin.testbench.developer.license}" />
- <test name="${junit.test.suite}" todir="${report.dir}" />
- </junit>
-
- </target>
-
-</project>
diff --git a/uitest/vaadin-server.xml b/uitest/vaadin-server.xml
deleted file mode 100644
index 5e9090a536..0000000000
--- a/uitest/vaadin-server.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?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}" />
-
- <target name="deploy-and-start">
- <fail unless="war.file" message="No war file given in 'war.file'" />
-
- <ivy:resolve log="download-only" 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" maxmemory="1024m">
- <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 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>