summaryrefslogtreecommitdiffstats
path: root/uitest/build.xml
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-09-16 14:31:37 +0300
committerVaadin Code Review <review@vaadin.com>2013-09-24 05:36:15 +0000
commita682e3b5341e5cf21e84c1dbbb2bc98743674392 (patch)
tree4e700896af7d80634d1838d3965f5312832c7d6e /uitest/build.xml
parent6b17abed4cbf3aff19efd58c5f3ca6195972f39e (diff)
downloadvaadin-framework-a682e3b5341e5cf21e84c1dbbb2bc98743674392.tar.gz
vaadin-framework-a682e3b5341e5cf21e84c1dbbb2bc98743674392.zip
Refactored build scripts to support TB2, TB3 + integration tests (#12572)
* Main build configuration triggers unit tests for all modules and uitest/build.xml testbench tests in parallel * uitest/build.xml triggers Jetty startup and integration (server) tests in parallel. After the server has started, TB2 and TB3 tests are run in parallel. * Server integration tests for servlet containers are run using TB3 and the com.vaadin.tests.tb3.ServletIntegrationTests test suite. * Portlet integration tests are still run using TB2 test scripts Change-Id: Ie6bffd4e68b4889074e9c470faa3c65f923e55c4
Diffstat (limited to 'uitest/build.xml')
-rw-r--r--uitest/build.xml55
1 files changed, 55 insertions, 0 deletions
diff --git a/uitest/build.xml b/uitest/build.xml
index bd0f49ae1e..76b75e9203 100644
--- a/uitest/build.xml
+++ b/uitest/build.xml
@@ -9,6 +9,7 @@
<!-- 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="result.war" location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />
@@ -107,6 +108,11 @@
<path refid="classpath.runtime.dependencies" />
</copy>
+ <delete>
+ <!-- Avoid including some potentially conflicting jars in the war -->
+ <fileset dir="${deps.dir}" includes="jetty-*.jar" />
+ <fileset dir="${deps.dir}" includes="servlet-api-*.jar" />
+ </delete>
<!-- Ensure filtered webcontent files are available -->
<antcall target="common.filter.webcontent" />
@@ -148,4 +154,53 @@
<echo>WHAT? No JUnit tests for ${module.name}!</echo>
</target>
+ <target name="test-testbench" depends="clean-testbench-errors" description="Run all TestBench based tests, including server tests">
+ <parallel>
+ <daemons>
+ <!-- Start server -->
+ <ant antfile="${uitest.dir}/vaadin-server.xml" inheritall="true" inheritrefs="true" target="deploy-and-start" />
+ </daemons>
+ <sequential>
+ <!-- Server tests -->
+
+ <!-- Sleep before running integration tests so testbench 2
+ tests have time to compile and start -->
+ <sleep minutes="4" />
+ <ant antfile="${uitest.dir}/integration_tests.xml" target="integration-test-all" inheritall="false" inheritrefs="false">
+ <property name="demo.war" value="${war.file}" />
+ </ant>
+ </sequential>
+ <sequential>
+ <!-- Wait for server to start -->
+ <ant antfile="${uitest.dir}/vaadin-server.xml" target="wait-for-startup" />
+
+ <!-- Run all different kinds of TestBench tests in parallel -->
+ <parallel>
+
+ <!-- Legacy TestBench 2 tests -->
+ <sequential>
+ <ant antfile="${uitest.dir}/test.xml" target="tb2-tests" />
+ <echo message="TestBench 2 tests complete" />
+ </sequential>
+
+ <!-- TestBench 3 tests -->
+ <sequential>
+ <ant antfile="${uitest.dir}/tb3test.xml" target="run-all-tb3-tests" inheritall="true" />
+ <echo message="TestBench 3 tests complete" />
+ </sequential>
+ </parallel>
+ </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>