]> source.dussan.org Git - vaadin-framework.git/commitdiff
Run tb3 tests in build
authorLeif Åstrand <leif@vaadin.com>
Mon, 12 Aug 2013 13:01:26 +0000 (16:01 +0300)
committerLeif Åstrand <leif@vaadin.com>
Mon, 12 Aug 2013 13:01:26 +0000 (16:01 +0300)
uitest/build.xml
uitest/ivy.xml
uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java
uitest/test.xml

index aaf891925e68a5356ecab420d6bbaee803772e90..eb10f004d5850a46d20621da982be8fc321d22ee 100644 (file)
             <path refid="classpath.runtime.dependencies" />
         </copy>
 
+        <delete>
+            <!-- Avoid 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" />
index 86d6a7768bfe36b25a4a790d835337387b3da6fc..581af54465763149b3131c26fef091e3fa2c50b8 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE ivy-module [
-    <!ENTITY jetty.version "8.1.7.v20120910">
+    <!ENTITY jetty.version "8.1.9.v20130131">
 ]>
 <ivy-module version="2.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -14,7 +14,7 @@
         <conf name="build" />
         <conf name="build-provided" visibility="private" />
         <conf name="ide" visibility="private" />
-        <conf name="jetty-run" extends="build" visibility="private" />
+        <conf name="jetty-run" visibility="private" />
     </configurations>
     <publications>
         <artifact type="war" ext="war" />
@@ -33,7 +33,9 @@
         <!-- LIBRARY DEPENDENCIES (compile time) -->
         <!-- Project modules -->
         <dependency org="com.vaadin" name="vaadin-server"
-            rev="${vaadin.version}" conf="build->build"></dependency>
+            rev="${vaadin.version}" conf="build->build">
+                       <exclude org="javax.servlet"></exclude>
+        </dependency>
         <dependency org="com.vaadin" name="vaadin-client"
             rev="${vaadin.version}" conf="build->build"></dependency>
         <dependency org="com.vaadin" name="vaadin-client-compiled"
@@ -41,7 +43,9 @@
         <dependency org="com.vaadin" name="vaadin-themes"
             rev="${vaadin.version}" conf="build->build"></dependency>
         <dependency org="com.vaadin" name="vaadin-push" rev="${vaadin.version}"
-            conf="build->build"></dependency>
+            conf="build->build">
+                       <exclude org="javax.servlet"></exclude>
+        </dependency>
 
         <!-- For compiling TestingWidgetSet -->
         <dependency org="com.vaadin" name="vaadin-client-compiler"
index da61c637fd7ff8aa7d463475fff1b05b806fc411..3ad0fba68b2ff699f32b943125b62d597826c2f6 100644 (file)
@@ -90,7 +90,7 @@ public abstract class PrivateTB3Configuration extends ScreenshotTB3Test {
                         continue;
                     }
                     String hostAddress = current_addr.getHostAddress();
-                    if (hostAddress.startsWith("192.168.2.")) {
+                    if (hostAddress.startsWith("192.168.")) {
                         return hostAddress;
                     }
                 }
index 3baccb4117dbe42a483e194f7c9b40ced7a9275a..36bd3aa0a60dc215553caa77c0419774f9e18bfc 100644 (file)
         <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">
+    <target name="run-tests" depends="run-tb3-tests, run-tb2-tests">
+    </target>
+
+    <target name="run-tb3-tests">
+        <ivy:resolve file="uitest/ivy.xml" conf="build, build-provided" />
+        <ivy:cachepath pathid="classpath.compile.dependencies" conf="build, build-provided" />
+
+        <junit printsummary="withOutAndErr" fork="yes">
+            <formatter usefile="false" type="plain" />
+
+            <classpath location="uitest/result/classes" />
+            <classpath refid="classpath.compile.dependencies" />
+
+            <jvmarg value="-Dcom.vaadin.testbench.tester.host=${com.vaadin.testbench.tester.host}" />
+            <jvmarg value="-Dcom.vaadin.testbench.deployment.hostname=auto" />
+            <!-- Define where the reference screenshots and diff files are 
+                    saved -->
+            <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="-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}" />
+
+            <test name="com.vaadin.tests.tb3.AllTB3Tests" />
+        </junit>
+    </target>
+
+    <target name="run-tb2-tests" depends="compile-tests">
         <fileset dir="${test-output-dir}" id="tests-fileset">
             <include name="**/**.java" />
         </fileset>