You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.xml 4.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?xml version="1.0"?>
  2. <project name="vaadin-uitest" basedir="." default="test-tb3"
  3. xmlns:ivy="antlib:org.apache.ivy.ant">
  4. <description>
  5. Provides a uitest WAR containing Vaadin UI tests
  6. </description>
  7. <include file="../common.xml" as="common" />
  8. <!-- global properties -->
  9. <property name="module.name" value="vaadin-uitest" />
  10. <property name="uitest.dir" location="${vaadin.basedir}/uitest" />
  11. <property name="result.dir" value="result" />
  12. <property name="theme.result.dir" value="${result.dir}/VAADIN/themes" />
  13. <property name="result.war"
  14. location="${result.dir}/lib/${module.name}-${vaadin.version}.war" />
  15. <!-- Need to give a default value to keep Ivy happy -->
  16. <property name="vaadin.build.repository" value="http://maven.vaadin.com/vaadin-prereleases"/>
  17. <target name="clean">
  18. <fail unless="result.dir" message="No result.dir parameter given" />
  19. <delete dir="${result.dir}" />
  20. </target>
  21. <target name="fetch-war">
  22. <mkdir dir="${vaadin.basedir}/uitest/target"/>
  23. <get src="${vaadin.build.repository}/com/vaadin/vaadin-uitest/${vaadin.version}/vaadin-uitest-${vaadin.version}.war" dest="${vaadin.basedir}/uitest/target/vaadin-uitest-${vaadin.version}.war"/>
  24. </target>
  25. <!-- run both normal and server tests -->
  26. <target name="test-all" depends="clean-testbench-errors">
  27. <property name="war.file"
  28. location="${vaadin.basedir}/uitest/target/vaadin-uitest-${vaadin.version}.war" />
  29. <mkdir dir="${vaadin.basedir}/result" />
  30. <parallel>
  31. <daemons>
  32. <ant antfile="${uitest.dir}/vaadin-server.xml"
  33. inheritall="true" inheritrefs="true" target="deploy-and-start" />
  34. </daemons>
  35. <sequential>
  36. <ant antfile="${uitest.dir}/vaadin-server.xml"
  37. target="wait-for-startup" />
  38. <ant antfile="${uitest.dir}/tb3test.xml" target="run-all-tb3-tests"
  39. inheritall="true" />
  40. <!-- within sequential for now not to cause problems with result parsing in CI -->
  41. <ant antfile="${uitest.dir}/integration_tests.xml"
  42. target="integration-test-all" inheritall="false"
  43. inheritrefs="false">
  44. <property name="demo.war" value="${war.file}" />
  45. </ant>
  46. </sequential>
  47. </parallel>
  48. </target>
  49. <target name="test-server" depends="clean-testbench-errors">
  50. <property name="war.file"
  51. location="${vaadin.basedir}/uitest/target/vaadin-uitest-${vaadin.version}.war" />
  52. <ant antfile="${uitest.dir}/integration_tests.xml"
  53. target="integration-test-all" inheritall="false"
  54. inheritrefs="false">
  55. <property name="demo.war" value="${war.file}" />
  56. </ant>
  57. </target>
  58. <target name="test-tb3" depends="clean-testbench-errors">
  59. <property name="war.file"
  60. location="${vaadin.basedir}/uitest/target/vaadin-uitest-${vaadin.version}.war" />
  61. <mkdir dir="${vaadin.basedir}/result" />
  62. <parallel>
  63. <daemons>
  64. <ant antfile="${uitest.dir}/vaadin-server.xml"
  65. inheritall="true" inheritrefs="true" target="deploy-and-start" />
  66. </daemons>
  67. <sequential>
  68. <ant antfile="${uitest.dir}/vaadin-server.xml"
  69. target="wait-for-startup" />
  70. <ant antfile="${uitest.dir}/tb3test.xml" target="run-all-tb3-tests"
  71. inheritall="true" />
  72. </sequential>
  73. </parallel>
  74. </target>
  75. <target name="clean-testbench-errors">
  76. <fail unless="com.vaadin.testbench.screenshot.directory"
  77. message="Define screenshot directory using -Dcom.vaadin.testbench.screenshot.directory" />
  78. <mkdir dir="${com.vaadin.testbench.screenshot.directory}/errors" />
  79. <delete>
  80. <fileset
  81. dir="${com.vaadin.testbench.screenshot.directory}/errors">
  82. <include name="*" />
  83. </fileset>
  84. </delete>
  85. </target>
  86. </project>