summaryrefslogtreecommitdiffstats
path: root/uitest/vaadin-server.xml
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-09-04 14:49:30 +0300
committerArtur Signell <artur@vaadin.com>2012-09-09 11:23:12 +0300
commitb2b384b531eff28e1fe33bdb91f77edd509970a8 (patch)
treed3c4cfb8bf30388b5fa985ce3f265da07503e097 /uitest/vaadin-server.xml
parentf73ff78c95ef6184e8365ada272bbbc147bdcd10 (diff)
downloadvaadin-framework-b2b384b531eff28e1fe33bdb91f77edd509970a8.tar.gz
vaadin-framework-b2b384b531eff28e1fe33bdb91f77edd509970a8.zip
Support running TestBench tests with the vaadin-uitest war (#9299)
Server is now launched using jetty-runner instead of a custom DemoLauncher
Diffstat (limited to 'uitest/vaadin-server.xml')
-rw-r--r--uitest/vaadin-server.xml72
1 files changed, 22 insertions, 50 deletions
diff --git a/uitest/vaadin-server.xml b/uitest/vaadin-server.xml
index 226965c642..f07ff49e50 100644
--- a/uitest/vaadin-server.xml
+++ b/uitest/vaadin-server.xml
@@ -1,56 +1,28 @@
<?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=".">
-
- <!-- Import common targets -->
- <import file="../build/common.xml" />
+<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" />
+
+ <target name="deploy-and-start">
+ <fail unless="war.file" message="No war file given in 'war.file'" />
+
+ <ivy:resolve file="ivy.xml" />
+ <ivy:cachepath pathid="classpath.jetty" conf="jetty-run" />
+ <java classname="org.mortbay.jetty.runner.Runner" fork="yes">
+ <arg value="--port" />
+ <arg value="8888" />
+ <arg value="${war.file}" />
+ <classpath refid="classpath.jetty" />
+ <jvmarg value="-ea" />
+ </java>
- <target name="check-params">
- <fail unless="output-dir" message="The 'output-dir' (usually build/result/vaadin-xxx) should be given to test script." />
- <fail unless="package.name" message="The 'package.name' property must be defined." />
- <fail unless="package.filename" message="The 'package.filename' property must be defined." />
- <fail unless="testing.testarea" message="The 'testing.testarea' property must be defined." />
- <property name="webroot" value="${testing.testarea}/${package.name}/WebContent" />
</target>
-
- <target name="prepare-testing-area" depends="check-params">
- <echo> Package name: ${package.name}</echo>
- <echo> Package filename: ${package.filename}</echo>
- <echo> Testing area: ${testing.testarea}</echo>
- <echo> test-output-dir: ${test-output-dir}</echo>
- <delete dir="${testing.testarea}/${package.name}" />
- <mkdir dir="${testing.testarea}/${package.name}/WebContent" />
- <echo>Extracting Vaadin package ${package.filename} to testing area ${testing.testarea}</echo>
- <unzip src="${package.filename}" dest="${testing.testarea}/${package.name}/WebContent" />
- </target>
+ <target name="wait-for-startup">
+ <echo>Waiting for Servlet Container to start up.</echo>
+ <waitfor maxwait="60" maxwaitunit="second" checkevery="5" checkeveryunit="second" timeoutproperty="server.start.failed">
+ <http url="http://localhost:8888" />
+ </waitfor>
+ <fail if="server.start.failed" message="Server startup failed" />
+ </target>
- <target name="deploy-and-start" depends="init-deps, prepare-testing-area">
- <property name="webroot" value="${testing.testarea}/${package.name}/WebContent"></property>
-
- <ivy:resolve file="ivy.xml"/>
- <ivy:cachepath pathid="server" conf="build" />
- <java classname="com.vaadin.launcher.DemoLauncher" fork="yes" dir="${testing.testarea}/${package.name}" resultproperty="server.start.result">
- <arg value="--nogui=1" />
- <classpath>
- <path location="${webroot}/WEB-INF/classes" />
- <fileset dir="${webroot}/WEB-INF/lib/" includes="*.jar" />
- <path refid="server" />
- </classpath>
- <jvmarg value="-Demma.coverage.out.file=${testing.testarea}/${package.name}/war.ec"/>
- <jvmarg value="-Djava.awt.headless=true"/>
- <jvmarg value="-ea" />
- </java>
- </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>