]> source.dussan.org Git - vaadin-framework.git/commitdiff
Enable integration testing with tb3
authorLeif Åstrand <leif@vaadin.com>
Wed, 21 Aug 2013 11:41:03 +0000 (14:41 +0300)
committerLeif Åstrand <leif@vaadin.com>
Wed, 21 Aug 2013 11:41:03 +0000 (14:41 +0300)
uitest/integration_tests.xml
uitest/test.xml

index be6989d15ffe266172171ce5ea4e12abfa358acb..0b57594a972b7fb74b5951d6087bb882f4f8ca07 100644 (file)
 
     <!-- Run basic integration test test -->
     <target name="integration-test-servlet">
-        <fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-servlet.html" />
-        <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
-        <subant target="run-tests" failonerror="false" antfile="test.xml">
-            <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
-            <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />
-            <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />
-            <property name="server.start.succeeded" value="1" />
-            <property name="browsers" value="${test_browsers}" />
-            <property name="testfiles" value="${testfiles}" />
-            <property name="test-output-dir" value="${integration_test.dir}/result/integration-test-output/${server-name}" />
-            <property name="retries" value="0" />
-
-            <fileset dir="." includes="test.xml" />
-        </subant>
-    </target>
-
-    <target name="integration-test-push-servlet">
-        <fileset dir="integration-testscripts" id="html-test-files" includes="integration-test-${server-name}-push-servlet.html" />
+        <fail unless="html-test-files">html-test-files must be defined</fail>
         <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
         <subant target="run-tests" failonerror="false" antfile="test.xml">
             <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
                     </condition>
                 </fail>
 
-                <copy file="integration-testscripts/common/integration_test.tpl" tofile="integration-testscripts/integration-test-${target-server}-servlet.html" overwrite="true" />
-                <antcall target="integration-test-servlet">
-                    <param name="server-name" value="${target-server}" />
-                    <param name="deployment.url" value="http://${target-host}:${target-port}" />
-                </antcall>
-
-                <!-- Run theme tests in all browsers if there's a property 
-                    with the test files -->
                 <antcontrib:if>
-                    <isset property="testfiles-theme" />
+                    <isset property="html-test-files" />
                     <antcontrib:then>
-                        <antcall target="integration-test-theme">
+                        <antcall target="integration-test-servlet">
                             <param name="server-name" value="${target-server}" />
                             <param name="deployment.url" value="http://${target-host}:${target-port}" />
                         </antcall>
                     </antcontrib:then>
+                    <antcontrib:else>
+                        <echo>Starting test.xml</echo>
+                        <subant target="run-tb3-tests" failonerror="false" buildpath=".." genericantfile="test.xml">
+                            <property name="junit.test.suite" value="com.vaadin.tests.tb3.AllIntegrationTests" />
+                            
+                            <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />
+                            <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />
+                            <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />
+                        </subant>                            
+                    </antcontrib:else>
                 </antcontrib:if>
 
-                <!-- Run integration tests with push -->
-                <copy file="integration-testscripts/common/integration_push_test.tpl" tofile="integration-testscripts/integration-test-${target-server}-push-servlet.html" overwrite="true" />
-                <antcall target="integration-test-push-servlet">
-                    <param name="server-name" value="${target-server}" />
-                    <param name="deployment.url" value="http://${target-host}:${target-port}" />
-                </antcall>
-
                 <!-- Run theme tests in all browsers if there's a property 
                     with the test files -->
                 <antcontrib:if>
index 36bd3aa0a60dc215553caa77c0419774f9e18bfc..c84225cd2c3344a8e8d9590416be4b3264d32e21 100644 (file)
     </target>
 
     <target name="run-tb3-tests">
+        <echo>Test.xml started</echo>
+        
+        <property name="junit.test.suite" value="com.vaadin.tests.tb3.AllTB3Tests" />
+        <property name="com.vaadin.testbench.deployment.hostname" value="auto" />
+        <property name="com.vaadin.testbench.deployment.url" value="" />
+        
         <ivy:resolve file="uitest/ivy.xml" conf="build, build-provided" />
         <ivy:cachepath pathid="classpath.compile.dependencies" conf="build, build-provided" />
 
             <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" />
+            <jvmarg value="-Dcom.vaadin.testbench.deployment.hostname=${com.vaadin.testbench.deployment.hostname}" />
+            <jvmarg value="-Ddeployment.url=${com.vaadin.testbench.deployment.url}" />
+            
             <!-- Define where the reference screenshots and diff files are 
                     saved -->
             <jvmarg value="-Dcom.vaadin.testbench.screenshot.directory=${com.vaadin.testbench.screenshot.directory}" />
             <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" />
+            <test name="${junit.test.suite}" />
         </junit>
     </target>