diff options
author | Artur Signell <artur@vaadin.com> | 2013-05-30 17:06:30 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-05-30 15:08:00 +0000 |
commit | 9a3dc4e99c7a417778342db83cd6e7c05558e5fb (patch) | |
tree | 4a77e0b93e48c9f2fec4839ffae76c3334ec337b /uitest/test.xml | |
parent | d850db60f9f7e144307bcf525d96665d1be64fc8 (diff) | |
download | vaadin-framework-9a3dc4e99c7a417778342db83cd6e7c05558e5fb.tar.gz vaadin-framework-9a3dc4e99c7a417778342db83cd6e7c05558e5fb.zip |
Formatted XML files using defined rules (#11956)
Change-Id: Iecd621321fdde29d2d89d910ba46e9dadee58995
Diffstat (limited to 'uitest/test.xml')
-rw-r--r-- | uitest/test.xml | 412 |
1 files changed, 225 insertions, 187 deletions
diff --git a/uitest/test.xml b/uitest/test.xml index 8228bd9d70..44dac13d90 100644 --- a/uitest/test.xml +++ b/uitest/test.xml @@ -1,189 +1,227 @@ <?xml version="1.0"?> -<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"> - - <include file="../common.xml" /> - <dirname property="test.xml.dir" file="${ant.file.Run Vaadin Testbench Tests}" /> - - <!-- ================================================================== --> - <!-- Configuration --> - <!-- ================================================================== --> - <!-- Browsers to use for testing --> - <property name="browsers-windows" value="winxp-ie8,win7-ie9,win7-ie10,winxp-firefox17-esr,winxp-safari5,winxp-googlechrome21,winxp-opera12" /> - <property name="browsers-linux" value="linux-firefox3,linux-opera10,linux-googlechrome8" /> - <property name="browsers-mac" value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" /> - - <property name="browsers" value="${browsers-windows}" /> - - <!-- Number of times to retry a test if it fails --> - <property name="retries" value="2" /> - - <!-- Screen shot base directory --> - <fail unless="com.vaadin.testbench.screenshot.directory" message="The 'com.vaadin.testbench.screenshot.directory' property must be defined." /> - - <!-- Screen shot resolution --> - <property name="com.vaadin.testbench.screenshot.resolution" value="1500x850" /> - - <!-- Host running Testbench Hub --> - <property name="com.vaadin.testbench.tester.host" value="testbench-hub.intra.itmill.com" /> - - <property name="com.vaadin.testbench.screenshot.block.error" value="0.025" /> - <property name="com.vaadin.testbench.debug" value="false" /> - - - <target name="initialize"> - <!-- classpath must include test bench jar and its dependencies --> - <path id="classpath"> - <fileset dir="${com.vaadin.testbench.lib.dir}" includes="**/*.jar" /> - </path> - </target> - - <!-- fileset containing all TestBench tests to run --> - <fileset dir="${test.xml.dir}" id="html-test-files"> - <include name="src/**/*.html" /> - <exclude name="integration-testscripts/**/*.html" /> - </fileset> - - <!-- This target converts HTML tests files to java junit tests. One test file for each browser is created. --> - <target name="create-tests" depends="initialize, remove-temp-testclasses"> - <!-- Temporary output directory, created and removed by this script --> - <fail unless="test-output-dir" message="The 'test-output-dir' property must be defined." /> - <property name="class-dir" value="${test-output-dir}/classes" /> - - <pathconvert pathsep=" " property="testfiles" refid="html-test-files" /> - - <java classname="com.vaadin.testbench.util.TestConverter" classpathref="classpath" fork="true"> - <sysproperty key="com.vaadin.testbench.test.retries" value="${retries}" /> - <jvmarg value="-Duser.language=en" /> - <jvmarg value="-Duser.country=US" /> - <arg value="${test-output-dir}" /> - <arg value="${browsers}" /> - <arg line="${testfiles}" /> - </java> - </target> - - - <!-- This target complies the generated java junit tests. --> - <target name="compile-tests" depends="create-tests"> - <mkdir dir="${class-dir}" /> - <javac includeantruntime="false" srcdir="${test-output-dir}" destdir="${class-dir}" debug="on" fork="yes" failonerror="false" encoding="UTF8"> - <classpath> - <path refid="classpath" /> - </classpath> - </javac> - </target> - - <!-- ================================================================== --> - <!-- Running Tests --> - <!-- ================================================================== --> - - <target name="check-parameters"> - <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined." /> - <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined." /> - <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"> - <fileset dir="${test-output-dir}" id="tests-fileset"> - <include name="**/**.java" /> - </fileset> - - <antcontrib:for threadCount="30" parallel="true" keepgoing="true" param="target"> - <path> - <fileset refid="tests-fileset" /> - </path> - <sequential> - <antcall target="execute-tests"> - <param name="target" value="@{target}" /> - <reference refid="classpath" /> - </antcall> - </sequential> - </antcontrib:for> - </target> - - <!-- This target runs the generated and compiled junit tests --> - <target name="execute-tests"> - <junit fork="yes" printsummary="withOutAndErr" maxmemory="96m"> - <classpath> - <path refid="classpath" /> - <pathelement path="${class-dir}" /> - </classpath> - - <formatter usefile="false" type="plain" /> - - <jvmarg value="-Dcom.vaadin.testbench.tester.host=${com.vaadin.testbench.tester.host}" /> - <jvmarg value="-Dcom.vaadin.testbench.deployment.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}" /> - <!-- 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}" /> - - <batchtest> - <filelist dir="${test-output-dir}" files="${target}" /> - </batchtest> - </junit> - - </target> - - <!-- Remove temporary source and compiled java files --> - <target name="remove-temp-testclasses"> - <delete failonerror="false"> - <fileset dir="${test-output-dir}"> - <include name="**/**.java" /> - <include name="**/**.class" /> - </fileset> - </delete> - </target> - - <!-- Remove old error screenshots --> - <target name="remove-error-screens"> - <mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" /> - <delete> - <fileset dir="${com.vaadin.testbench.screenshot.directory}/errors"> - <include name="**/**.*" /> - </fileset> - </delete> - </target> - - <!-- ================================================================== --> - <!-- Main Targets --> - <!-- ================================================================== --> - - <!-- The default target. --> - <target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tests" /> - - - <!-- Starts the server and runs all TestBench tests --> - <target name="test-package"> - <fail unless="war.file" message="No 'war.file' parameter given." /> - <property name="test-output-dir" location="${test.xml.dir}/result/testbench-junit-classes" /> - <property name="retries" value="2" /> - - <!-- Parameters for the test.xml script. --> - <fail unless="com.vaadin.testbench.tester.host" message="The 'com.vaadin.testbench.tester.host' property must be defined." /> - <fail unless="com.vaadin.testbench.deployment.url" message="The 'com.vaadin.testbench.deployment.url' property must be defined." /> - <fail unless="com.vaadin.testbench.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined." /> - <property name="com.vaadin.testbench.screenshot.block.error" value="0.025" /> - <property name="com.vaadin.testbench.debug" value="false" /> - - <parallel> - <daemons> - <ant antfile="${test.xml.dir}/vaadin-server.xml" inheritall="true" inheritrefs="true" target="deploy-and-start" /> - </daemons> - <sequential> - <ant antfile="${test.xml.dir}/vaadin-server.xml" target="wait-for-startup" /> - <antcall inheritall="true" inheritrefs="true" target="run-and-clean-up" /> - <echo message="All TestBench tests have been run" /> - </sequential> - </parallel> - </target> +<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"> + + <include file="../common.xml" /> + <dirname property="test.xml.dir" file="${ant.file.Run Vaadin Testbench Tests}" /> + + <!-- ================================================================== --> + <!-- Configuration --> + <!-- ================================================================== --> + <!-- Browsers to use for testing --> + <property name="browsers-windows" + value="winxp-ie8,win7-ie9,win7-ie10,winxp-firefox17-esr,winxp-safari5,winxp-googlechrome21,winxp-opera12" /> + <property name="browsers-linux" + value="linux-firefox3,linux-opera10,linux-googlechrome8" /> + <property name="browsers-mac" + value="osx-firefox3,osx-opera10,osx-googlechrome8,osx-safari4,osx-safari5" /> + + <property name="browsers" value="${browsers-windows}" /> + + <!-- Number of times to retry a test if it fails --> + <property name="retries" value="2" /> + + <!-- Screen shot base directory --> + <fail unless="com.vaadin.testbench.screenshot.directory" + message="The 'com.vaadin.testbench.screenshot.directory' property must be defined." /> + + <!-- Screen shot resolution --> + <property name="com.vaadin.testbench.screenshot.resolution" + value="1500x850" /> + + <!-- Host running Testbench Hub --> + <property name="com.vaadin.testbench.tester.host" value="testbench-hub.intra.itmill.com" /> + + <property name="com.vaadin.testbench.screenshot.block.error" + value="0.025" /> + <property name="com.vaadin.testbench.debug" value="false" /> + + + <target name="initialize"> + <!-- classpath must include test bench jar and its dependencies --> + <path id="classpath"> + <fileset dir="${com.vaadin.testbench.lib.dir}" + includes="**/*.jar" /> + </path> + </target> + + <!-- fileset containing all TestBench tests to run --> + <fileset dir="${test.xml.dir}" id="html-test-files"> + <include name="src/**/*.html" /> + <exclude name="integration-testscripts/**/*.html" /> + </fileset> + + <!-- This target converts HTML tests files to java junit tests. One test + file for each browser is created. --> + <target name="create-tests" depends="initialize, remove-temp-testclasses"> + <!-- Temporary output directory, created and removed by this script --> + <fail unless="test-output-dir" + message="The 'test-output-dir' property must be defined." /> + <property name="class-dir" value="${test-output-dir}/classes" /> + + <pathconvert pathsep=" " property="testfiles" refid="html-test-files" /> + + <java classname="com.vaadin.testbench.util.TestConverter" + classpathref="classpath" fork="true"> + <sysproperty key="com.vaadin.testbench.test.retries" + value="${retries}" /> + <jvmarg value="-Duser.language=en" /> + <jvmarg value="-Duser.country=US" /> + <arg value="${test-output-dir}" /> + <arg value="${browsers}" /> + <arg line="${testfiles}" /> + </java> + </target> + + + <!-- This target complies the generated java junit tests. --> + <target name="compile-tests" depends="create-tests"> + <mkdir dir="${class-dir}" /> + <javac includeantruntime="false" srcdir="${test-output-dir}" + destdir="${class-dir}" debug="on" fork="yes" failonerror="false" + encoding="UTF8"> + <classpath> + <path refid="classpath" /> + </classpath> + </javac> + </target> + + <!-- ================================================================== --> + <!-- Running Tests --> + <!-- ================================================================== --> + + <target name="check-parameters"> + <fail unless="com.vaadin.testbench.lib.dir" + message="The 'com.vaadin.testbench.lib.dir' property must be defined." /> + <fail unless="com.vaadin.testbench.tester.host" + message="The 'com.vaadin.testbench.tester.host' property must be defined." /> + <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"> + <fileset dir="${test-output-dir}" id="tests-fileset"> + <include name="**/**.java" /> + </fileset> + + <antcontrib:for threadCount="30" parallel="true" + keepgoing="true" param="target"> + <path> + <fileset refid="tests-fileset" /> + </path> + <sequential> + <antcall target="execute-tests"> + <param name="target" value="@{target}" /> + <reference refid="classpath" /> + </antcall> + </sequential> + </antcontrib:for> + </target> + + <!-- This target runs the generated and compiled junit tests --> + <target name="execute-tests"> + <junit fork="yes" printsummary="withOutAndErr" maxmemory="96m"> + <classpath> + <path refid="classpath" /> + <pathelement path="${class-dir}" /> + </classpath> + + <formatter usefile="false" type="plain" /> + + <jvmarg + value="-Dcom.vaadin.testbench.tester.host=${com.vaadin.testbench.tester.host}" /> + <jvmarg + value="-Dcom.vaadin.testbench.deployment.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}" /> + <!-- 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}" /> + + <batchtest> + <filelist dir="${test-output-dir}" files="${target}" /> + </batchtest> + </junit> + + </target> + + <!-- Remove temporary source and compiled java files --> + <target name="remove-temp-testclasses"> + <delete failonerror="false"> + <fileset dir="${test-output-dir}"> + <include name="**/**.java" /> + <include name="**/**.class" /> + </fileset> + </delete> + </target> + + <!-- Remove old error screenshots --> + <target name="remove-error-screens"> + <mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" /> + <delete> + <fileset + dir="${com.vaadin.testbench.screenshot.directory}/errors"> + <include name="**/**.*" /> + </fileset> + </delete> + </target> + + <!-- ================================================================== --> + <!-- Main Targets --> + <!-- ================================================================== --> + + <!-- The default target. --> + <target name="run-and-clean-up" + depends="check-parameters,remove-error-screens,run-tests" /> + + + <!-- Starts the server and runs all TestBench tests --> + <target name="test-package"> + <fail unless="war.file" message="No 'war.file' parameter given." /> + <property name="test-output-dir" + location="${test.xml.dir}/result/testbench-junit-classes" /> + <property name="retries" value="2" /> + + <!-- Parameters for the test.xml script. --> + <fail unless="com.vaadin.testbench.tester.host" + message="The 'com.vaadin.testbench.tester.host' property must be defined." /> + <fail unless="com.vaadin.testbench.deployment.url" + message="The 'com.vaadin.testbench.deployment.url' property must be defined." /> + <fail unless="com.vaadin.testbench.lib.dir" + message="The 'com.vaadin.testbench.lib.dir' property must be defined." /> + <property name="com.vaadin.testbench.screenshot.block.error" + value="0.025" /> + <property name="com.vaadin.testbench.debug" value="false" /> + + <parallel> + <daemons> + <ant antfile="${test.xml.dir}/vaadin-server.xml" + inheritall="true" inheritrefs="true" target="deploy-and-start" /> + </daemons> + <sequential> + <ant antfile="${test.xml.dir}/vaadin-server.xml" + target="wait-for-startup" /> + <antcall inheritall="true" inheritrefs="true" + target="run-and-clean-up" /> + <echo message="All TestBench tests have been run" /> + </sequential> + </parallel> + </target> </project> |