aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_tests.xml14
-rw-r--r--tests/ivy.xml7
-rw-r--r--tests/test.xml33
-rw-r--r--tests/vaadin-server.xml22
4 files changed, 39 insertions, 37 deletions
diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml
index 2f10394ee0..c96c93bbe4 100644
--- a/tests/integration_tests.xml
+++ b/tests/integration_tests.xml
@@ -2,6 +2,9 @@
<project name="Vaadin Integration Tests" basedir="." default="integration-test-all">
+ <!-- Import common targets -->
+ <import file="../build/common.xml" />
+
<!-- Target deploying demo.war -->
<fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run"/>
@@ -27,14 +30,7 @@
<property name="ant.hub" value="${test.integration.antfile}" />
<property name="user" value="${test.integration.user}" />
<property name="passphrase" value="" />
-
- <!-- add ant contrib -->
- <taskdef resource="net/sf/antcontrib/antcontrib.properties">
- <classpath>
- <pathelement location="../build/lib/ant-contrib-1.0b3.jar"/>
- </classpath>
- </taskdef>
-
+
<!-- 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}" />
@@ -261,7 +257,7 @@
</target>
<!-- Upload demo, clean error screenshots and test deployment on all servers -->
- <target name="integration-test-all">
+ <target name="integration-test-all" depends="common.init-deps">
<parallel>
<trycatch property="tried">
diff --git a/tests/ivy.xml b/tests/ivy.xml
index 3fdaf81ef1..6c7171166b 100644
--- a/tests/ivy.xml
+++ b/tests/ivy.xml
@@ -3,11 +3,14 @@
xsi:noNamespaceSchemaLocation= "http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="com.vaadin" module="tests"/>
- <configurations defaultconfmapping="*->jetty">
+ <configurations>
<conf name="jetty" visibility="private" />
+ <conf name="emma" visibility="private" />
+ <conf name="server" visibility="private" />
</configurations>
<publications />
<dependencies>
- <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.7" conf="jetty->default(*)" />
+ <dependency org="org.mortbay.jetty" name="jetty" rev="6.1.7" conf="server,jetty->default(*)" />
+ <dependency org="emma" name="emma" rev="2.0.5312-patched" conf="server,emma -> default(*)"/>
</dependencies>
</ivy-module> \ No newline at end of file
diff --git a/tests/test.xml b/tests/test.xml
index 51d2bae3a6..5ea9547fa4 100644
--- a/tests/test.xml
+++ b/tests/test.xml
@@ -2,6 +2,12 @@
<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">
+
+ <!-- Import common targets -->
+ <import file="../build/common.xml" />
+ <!-- Import targets for server management -->
+ <import file="vaadin-server.xml" as="server"/>
+
<!-- ================================================================== -->
<!-- Configuration -->
<!-- ================================================================== -->
@@ -28,20 +34,19 @@
<property name="com.vaadin.testbench.debug" value="false"/>
<!-- Temporary output directory, created and removed by this script -->
- <!-- <property name="test-output-dir" value="../build/test-output" /> -->
- <fail unless="test-output-dir" message="The 'test-output-dir' property must be defined." />
-
- <!-- Include targets for server management -->
- <include file="vaadin-server.xml" as="server"/>
+ <fail unless="test-output-dir" message="The 'test-output-dir' property must be defined." />
<property name="class-dir" value="${test-output-dir}/classes" />
- <!-- classpath must include test bench jar and its dependencies -->
- <!-- TODO emma-->
- <path id="classpath">
- <fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" />
- <fileset dir="../build/lib" includes="emma*.jar" />
- </path>
+ <target name="initialize" depends="common.init-deps">
+ <ivy:resolve conf="emma"/>
+ <ivy:cachepath pathid="emma.lib" conf="emma" />
+ <!-- classpath must include test bench jar and its dependencies -->
+ <path id="classpath">
+ <fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" />
+ <path refid="emma.lib" />
+ </path>
+ </target>
<!-- fileset containing all TestBench tests to run -->
<fileset dir=".." id="html-test-files">
@@ -97,6 +102,7 @@
<sequential>
<antcall target="execute-tests">
<param name="target" value="@{target}" />
+ <reference refid="classpath" />
</antcall>
</sequential>
</antcontrib:for>
@@ -159,14 +165,13 @@
<!-- ================================================================== -->
<!-- The default target. -->
- <target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tests">
- </target>
+ <target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tests" />
<!-- Also starts the server. -->
<target name="test-package">
<parallel>
<daemons>
- <antcall inheritall="true" inheritrefs="true" target="server.deploy-and-start" />
+ <ant antfile="vaadin-server.xml" inheritall="true" inheritrefs="true" target="deploy-and-start" />
</daemons>
<sequential>
<antcall target="server.wait-for-startup" />
diff --git a/tests/vaadin-server.xml b/tests/vaadin-server.xml
index 6445106d35..99117238ea 100644
--- a/tests/vaadin-server.xml
+++ b/tests/vaadin-server.xml
@@ -2,7 +2,10 @@
<project xmlns:antcontrib="antlib:net.sf.antcontrib"
xmlns:ivy="antlib:org.apache.ivy.ant"
name="vaadin-server"
- default="deploy-and-start">
+ default="deploy-and-start" basedir=".">
+
+ <!-- Import common targets -->
+ <import file="../build/common.xml" />
<target name="check-params">
<fail unless="output-dir" message="The 'output-dir' (usually build/result/vaadin-xxx) should be given to test script." />
@@ -11,13 +14,6 @@
<fail unless="testing.testarea" message="The 'testing.testarea' property must be defined." />
<property name="webroot" value="${testing.testarea}/${package.name}/WebContent" />
</target>
-
- <target name="ivy-resolve">
- <ivy:resolve file="ivy.xml" resolveid="tests"/>
- <ivy:cachepath pathid="jetty.lib" conf="jetty" resolveid="tests" />
- <!-- Emma libs from "common" resolve -->
- <ivy:cachepath pathid="emma.lib" conf="emma" resolveid="common"/>
- </target>
<target name="prepare-testing-area" depends="check-params">
<echo> Package name: ${package.name}</echo>
@@ -31,15 +27,17 @@
<unzip src="${package.filename}" dest="${testing.testarea}/${package.name}/WebContent" />
</target>
- <target name="deploy-and-start" depends="ivy-resolve, prepare-testing-area">
+ <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="server" />
<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="jetty.lib" />
- <path refid="emma.lib" />
+ <path refid="server" />
</classpath>
<jvmarg value="-Demma.coverage.out.file=${testing.testarea}/${package.name}/war.ec"/>
<jvmarg value="-Djava.awt.headless=true"/>
@@ -48,7 +46,7 @@
<target name="wait-for-startup">
<echo>Waiting for Servlet Container to start up.</echo>
- <waitfor maxwait="30" maxwaitunit="second" checkevery="1" checkeveryunit="second" timeoutproperty="server.start.failed">
+ <waitfor maxwait="30" maxwaitunit="second" checkevery="3" checkeveryunit="second" timeoutproperty="server.start.failed">
<http url="http://localhost:8888"/>
</waitfor>
<fail if="server.start.failed" message="Server startup failed" />