]> source.dussan.org Git - vaadin-framework.git/commitdiff
Added server integration tests. For #3386
authorMikael Grankvist <mikael.grankvist@itmill.com>
Tue, 24 Nov 2009 09:13:34 +0000 (09:13 +0000)
committerMikael Grankvist <mikael.grankvist@itmill.com>
Tue, 24 Nov 2009 09:13:34 +0000 (09:13 +0000)
svn changeset:9973/svn branch:6.2

build/build.xml
tests/integration-testscripts/Add_Sampler_to_Liferay.html [new file with mode: 0644]
tests/integration-testscripts/sampler_deployment.tpl [new file with mode: 0644]
tests/integration-testscripts/sampler_deployment_liferay.html [new file with mode: 0644]
tests/integration_tests.xml [new file with mode: 0644]
tests/test.xml

index 0e3b8400b9fb98af630b617c9af4787225af77c2..386b8bdf8d42322b33d988796343f19867df4493 100644 (file)
     <!-- Automated tests.                                                   -->
     <!-- ================================================================== -->
 
-    <target name="tests" depends="ant-tests, testbench-tests">
+    <target name="tests" depends="ant-tests, testbench-tests, integration-tests">
     </target>
 
     <target name="testbench-tests" depends="init">
 
         <echo>##teamcity[testSuiteFinished name='com.vaadin.tests.test-framework']</echo>
     </target>
+       
+    <target name="integration-tests" depends="internal-package-war">
+        <!-- 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.lib.dir" message="The 'com.vaadin.testbench.lib.dir' property must be defined."/>
+        <fail unless="key.file" message="The 'key.file' property must be defined."/>
+
+        <!-- Empty passphrase if no passphrase defined -->
+        <property name="passphrase" value="" />
+
+        <!-- Run the separate test script. -->
+        <ant antfile="tests/integration_tests.xml" target="tomcat4" inheritall="false" inheritrefs="true">
+              <!-- This is provided so that the test script can copy the -->
+              <!-- "tests" classes after unpacking the package.          -->
+                     <property name="output-dir" value="${output-dir}"/>
+
+                     <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}"/>
+                     <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/>
+                         <property name="key.file" value="${key.file}" />
+                         <property name="passphrase" value="${passphrase}" />
+                     <property name="demo.war" value="${result-path}/${product-file}-demo-${version.full}.war"/>
+        </ant>
+    </target>
 </project>
 
 <!-- These are for emacs. -->
diff --git a/tests/integration-testscripts/Add_Sampler_to_Liferay.html b/tests/integration-testscripts/Add_Sampler_to_Liferay.html
new file mode 100644 (file)
index 0000000..41a6ea7
--- /dev/null
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://192.168.56.102:8080/" />
+<title>Add_Sampler_to_Liferay</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Add_Sampler_to_Liferay</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/web/guest</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClickAndWait</td>
+       <td>link=Login as bruno</td>
+       <td>48,8</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>//div[@id='add-page']/a/span</td>
+       <td>44,113</td>
+</tr>
+<tr>
+       <td>enterCharacter</td>
+       <td>new_page</td>
+       <td>sampler</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>link=Save</td>
+       <td>26,13</td>
+</tr>
+<tr>
+       <td>pause</td>
+       <td>200</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClickAndWait</td>
+       <td>link=sampler</td>
+       <td>39,25</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>link=Layout Template</td>
+       <td>122,21</td>
+</tr>
+<tr>
+       <td>pause</td>
+       <td>200</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>//img[@onclick=&quot;document.getElementById('layoutTemplateId1').checked = true;&quot;]</td>
+       <td>65,78</td>
+</tr>
+<tr>
+       <td>mouseClickAndWait</td>
+       <td>document.forms[1].elements[14]</td>
+       <td>23,12</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>link=Add Application</td>
+       <td>76,18</td>
+</tr>
+<tr>
+       <td>pause</td>
+       <td>3000</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClickAndWait</td>
+       <td>//div[@id='Vaadin-Sampler']/p/a</td>
+       <td>9,8</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/integration-testscripts/sampler_deployment.tpl b/tests/integration-testscripts/sampler_deployment.tpl
new file mode 100644 (file)
index 0000000..00823cc
--- /dev/null
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">\r
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">\r
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r
+<link rel="selenium.base" href="" />\r
+<title>demosampler-all-samples</title>\r
+</head>\r
+<body>\r
+<table cellpadding="1" cellspacing="1" border="1">\r
+<thead>\r
+<tr><td rowspan="1" colspan="3">sampler-all-samples</td></tr>\r
+</thead><tbody>\r
+<tr>\r
+       <td>openAndWait</td>\r
+       <td>/demo</td>\r
+       <td></td>\r
+</tr>\r
+<tr>\r
+       <td>waitForVaadin</td>\r
+       <td></td>\r
+       <td></td>\r
+</tr>\r
+<tr>\r
+       <td>mouseClickAndWait</td>\r
+       <td>//div[@id='sampler']/a/strong</td>\r
+       <td>96,14</td>\r
+</tr>\r
+<tr>\r
+       <td>pause</td>\r
+       <td>1000</td>\r
+       <td></td>\r
+</tr>\r
+<tr>\r
+       <td>waitForVaadin</td>\r
+       <td></td>\r
+       <td></td>\r
+</tr>\r
+<!--Start scrolling through all samples in order-->\r
+<tr>\r
+       <td>mouseClick</td>\r
+       <td>vaadin=demosampler::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[7]/VHorizontalLayout[0]/ChildComponentContainer[1]/VNativeButton[0]</td>\r
+       <td>11,13</td>\r
+</tr>\r
+<tr>\r
+       <td>waitForVaadin</td>\r
+       <td></td>\r
+       <td></td>\r
+</tr>\r
+<tr>\r
+       <td>pause</td>\r
+       <td>500</td>\r
+       <td></td>\r
+</tr>\r
+<tr>\r
+       <td>screenCapture</td>\r
+       <td></td>\r
+       <td>@server@_1</td>\r
+</tr>\r
+<tr>\r
+       <td>mouseClick</td>\r
+       <td>vaadin=demosampler::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[7]/VHorizontalLayout[0]/ChildComponentContainer[1]/VNativeButton[0]</td>\r
+       <td>11,13</td>\r
+</tr>\r
+<tr>\r
+       <td>waitForVaadin</td>\r
+       <td></td>\r
+       <td></td>\r
+</tr>\r
+<tr>\r
+       <td>pause</td>\r
+       <td>500</td>\r
+       <td></td>\r
+</tr>\r
+<tr>\r
+       <td>screenCapture</td>\r
+       <td></td>\r
+       <td>@server@_2</td>\r
+</tr>\r
+\r
+</tbody></table>\r
+</body>\r
+</html>\r
diff --git a/tests/integration-testscripts/sampler_deployment_liferay.html b/tests/integration-testscripts/sampler_deployment_liferay.html
new file mode 100644 (file)
index 0000000..da5c51a
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_Sampler</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_Sampler</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/web/guest/sampler</td>
+       <td></td>
+</tr>
+<tr>
+       <td>waitForVaadin</td>
+       <td></td>
+       <td></td>
+</tr>
+<tr>
+       <td>pause</td>
+       <td>500</td>
+       <td></td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=demosampler::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[7]/VHorizontalLayout[0]/ChildComponentContainer[1]/VNativeButton[0]</td>
+       <td>11,12</td>
+</tr>
+<tr>
+       <td>waitForVaadin</td>
+       <td></td>
+       <td></td>
+</tr>
+<tr>
+       <td>pause</td>
+       <td>500</td>
+       <td></td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=demosampler::/VVerticalLayout[0]/ChildComponentContainer[0]/VHorizontalLayout[0]/ChildComponentContainer[7]/VHorizontalLayout[0]/ChildComponentContainer[1]/VNativeButton[0]</td>
+       <td>11,12</td>
+</tr>
+<tr>
+       <td>waitForVaadin</td>
+       <td></td>
+       <td></td>
+</tr>
+<tr>
+       <td>pause</td>
+       <td>500</td>
+       <td></td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml
new file mode 100644 (file)
index 0000000..f00d9e0
--- /dev/null
@@ -0,0 +1,375 @@
+<?xml version="1.0"?>\r
+\r
+<project name="Test sampler deployment" basedir="." default="all">\r
+    \r
+       <!-- Test with these browsers -->\r
+       <property name="test_browsers" value="winxp-firefox35" />\r
+\r
+       <!-- Target deploying demo.war -->\r
+       <property name="sshHost" value="rndtestlinux.office.itmill.com" />\r
+       \r
+       <!-- Key file to use -->\r
+       <property name="key.file" value="id_rsa" />\r
+       \r
+       <!-- path and name for demo.war to be deployed -->\r
+       <property name="demo.war" value="demo.war"/>\r
+       \r
+       <!-- Host running Testbench RC or Testbench Hub -->\r
+       <property name="com.vaadin.testbench.tester.host" value="127.0.0.1" />\r
+\r
+       <!-- Base url where the testable application is deployed -->\r
+       <property name="deployment.url" value="http://${sshHost}:8080" />\r
+\r
+       <!-- ssh host values -->\r
+       <property name="ant.hub" value="/home/rnd/deploy.xml" />\r
+       <property name="user" value="rnd" />\r
+       <property name="passphrase" value="" />\r
+       \r
+       <!-- Upload war to deploy to ssh host -->\r
+       <target name="upload-demo">\r
+               <scp file="${demo.war}" todir="${user}@${sshHost}:servers/demo.war" keyfile="${key.file}" passphrase="${passphrase}" />\r
+       </target>\r
+       \r
+       <!-- Run sampler deployment test -->\r
+       <target name="test-sampler">\r
+               <fileset dir="integration-testscripts" id="html-test-files" includes="sampler_deployment.html"/>\r
+               <pathconvert pathsep=" " property="testfiles" refid="html-test-files" />\r
+               \r
+               <subant target="run-tests" failonerror="false" antfile="test.xml">\r
+                       <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/>\r
+                       <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
+                       <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />\r
+                       <property name="browsers" value="${test_browsers}" />\r
+                       <property name="testfiles" value="${testfiles}" />\r
+                       \r
+                       <fileset dir="." includes="test.xml" />\r
+               </subant>\r
+       </target>\r
+       \r
+       <!-- Start and stop methods for servers -->\r
+       <target name="start-tomcat-4">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-tomcat-4.1.40" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="tomcat-4.1.40" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-tomcat-4">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-tomcat-4.1.40" />\r
+       </target>\r
+       \r
+       <target name="start-tomcat-5">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-tomcat-5.5.28" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="tomcat-5.5.28" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-tomcat-5">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-tomcat-5.5.28" />\r
+       </target>\r
+       \r
+       <target name="start-tomcat-6">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-tomcat-6.0.20" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="tomcat-6.0.20" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-tomcat-6">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-tomcat-6.0.20" />\r
+       </target>\r
+       \r
+       <target name="start-jetty-5">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-jetty-5.1.15" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="jetty-5.1.15" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-jetty-5">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-jetty-5.1.15" />\r
+       </target>\r
+\r
+       <target name="start-jetty-6">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-jetty-6.1.22" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="jetty-6.1.22" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-jetty-6">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-jetty-6.1.22" />\r
+       </target>\r
+       \r
+       <target name="start-jetty-7">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-jetty-7.0.0" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="jetty-7.0.0" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-jetty-7">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-jetty-7.0.0" />\r
+       </target>\r
+       \r
+       <target name="start-jboss-3">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-jboss-3.2.8" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="jboss-3.2.8" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-jboss-3">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-jboss-3.2.8" />\r
+       </target>\r
+       \r
+       <target name="start-jboss-4">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-jboss-4.2.3" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="jboss-4.2.3" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-jboss-4">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-jboss-4.2.3" />\r
+       </target>\r
+       \r
+       <target name="start-jboss-5">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-jboss-5.0.1" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="jboss-5.0.1" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-jboss-5">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-jboss-5.0.1" />\r
+       </target>\r
+       \r
+       <target name="start-glassfish">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-glassfish-2.1.1" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="glassfish-2.1.1" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+       \r
+       <target name="stop-glassfish">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-glassfish-2.1.1" />\r
+       </target>\r
+       \r
+       <!-- Test liferay sampler -->\r
+       <target name="test-liferay">\r
+               <fileset dir="integration-testscripts" id="html-test-files" includes="sampler_deployment_liferay.html"/>\r
+               <pathconvert pathsep=" " property="test-liferay" refid="html-test-files" />\r
+               \r
+               <subant target="run-tests" failonerror="false" antfile="test.xml">\r
+                       <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/>\r
+                       <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
+                       <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />\r
+                       <property name="browsers" value="${test_browsers}" />\r
+                       <property name="testfiles" value="${test-liferay}" />\r
+                       \r
+                       <fileset dir="." includes="test.xml" />\r
+               </subant>\r
+       </target>\r
+       \r
+       <!-- "deploy" sampler to liferay -->\r
+       <target name="init-liferay">\r
+               <fileset dir="integration-testscripts" id="html-test-files" includes="Add_Sampler_to_Liferay.html"/>\r
+               <pathconvert pathsep=" " property="init-liferay" refid="html-test-files" />\r
+               \r
+               <subant target="run-tests" failonerror="false" antfile="test.xml">\r
+                       <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/>\r
+                       <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
+                       <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />\r
+                       <property name="browsers" value="winxp-firefox35" />\r
+                       <property name="testfiles" value="${init-liferay}" />\r
+       \r
+                       <fileset dir="." includes="test.xml" />\r
+               </subant>\r
+       </target>\r
+       \r
+       <target name="start-liferay">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-liferay-5.2.3" />\r
+       </target>\r
+\r
+       <target name="stop-liferay">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-liferay-5.2.3" />\r
+       </target>\r
+       \r
+       <!-- Run sampler deployment test for WebLogic server -->\r
+       <target name="test-weblogic">\r
+               <fileset dir="integration-testscripts" id="html-test-files" includes="sampler_deployment.html"/>\r
+               <pathconvert pathsep=" " property="test-weblogic" refid="html-test-files" />\r
+               \r
+               <subant target="run-tests" failonerror="false" antfile="test.xml">\r
+                       <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}"/>\r
+                       <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
+                       <property name="com.vaadin.testbench.deployment.url" value="http://${sshHost}:7001" />\r
+                       <property name="browsers" value="${test_browsers}" />\r
+                       <property name="testfiles" value="${test-weblogic}" />\r
+                       \r
+                       <fileset dir="." includes="test.xml" />\r
+               </subant>\r
+       </target>\r
+       \r
+       <target name="start-weblogic9">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-weblogic-9.2" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="weblogic-9.2" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-weblogic9">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-weblogic-9.2" />\r
+       </target>\r
+       \r
+       <target name="start-weblogic10">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} start-weblogic-10.3" />\r
+               <copy file="integration-testscripts/sampler_deployment.tpl" tofile="integration-testscripts/sampler_deployment.html" overwrite="true">\r
+                       <filterchain>\r
+                               <replacetokens>\r
+                                       <token key="server" value="weblogic-10.3" />\r
+                               </replacetokens>\r
+                       </filterchain>\r
+               </copy>\r
+       </target>\r
+\r
+       <target name="stop-weblogic10">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} stop-weblogic-10.3" />\r
+       </target>\r
+       \r
+       <!-- Server setup, test and teardown targets. -->\r
+       <target name="tomcat4">\r
+               <antcall target="start-tomcat-4"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-tomcat-4"/>\r
+       </target>\r
+       \r
+       <target name="tomcat5">\r
+               <antcall target="start-tomcat-5"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-tomcat-5"/>\r
+       </target>       \r
+       \r
+       <target name="tomcat6">\r
+               <antcall target="start-tomcat-6"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-tomcat-6"/>\r
+       </target>\r
+       \r
+       <target name="jetty5">\r
+               <antcall target="start-jetty-5"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-jetty-5"/>\r
+       </target>\r
+       \r
+       <target name="jetty6">\r
+               <antcall target="start-jetty-6"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-jetty-6"/>\r
+       </target>\r
+       \r
+       <target name="jetty7">\r
+               <antcall target="start-jetty-7"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-jetty-7"/>\r
+       </target>\r
+       \r
+       <target name="jboss3">\r
+               <antcall target="start-jboss-3"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-jboss-3"/>\r
+       </target>\r
+       \r
+       <target name="jboss4">\r
+               <antcall target="start-jboss-4"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-jboss-4"/>\r
+       </target>\r
+       \r
+       <target name="jboss5">\r
+               <antcall target="start-jboss-5"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-jboss-5"/>\r
+       </target>\r
+               \r
+       <target name="glassfish">\r
+               <antcall target="start-glassfish"/>\r
+               <antcall target="test-sampler"/>\r
+               <antcall target="stop-glassfish"/>\r
+       </target>\r
+       \r
+       <target name="liferay" depends="start-liferay,init-liferay,test-liferay,stop-liferay" />\r
+       \r
+       <target name="weblogic9">\r
+               <antcall target="start-weblogic9"/>\r
+               <antcall target="test-weblogic"/>\r
+               <antcall target="stop-weblogic9"/>\r
+       </target>\r
+       \r
+       <target name="weblogic10">\r
+               <antcall target="start-weblogic10"/>\r
+               <antcall target="test-weblogic"/>\r
+               <antcall target="stop-weblogic10"/>\r
+       </target>\r
+       \r
+       <!-- Upload demo, clean error screenshots and test deployment on all servers -->\r
+       <target name="all" depends="upload-demo,tomcat4,tomcat5,tomcat6,jetty5,jetty6,jetty7,jboss3,jboss4,jboss5,glassfish,liferay,weblogic9,weblogic10,clean" />\r
+       \r
+       <!-- Remove demo.war -->\r
+       <target name="clean">\r
+               <sshexec host="${sshHost}" username="${user}" keyfile="${key.file}" command="ant -f ${ant.hub} clean" />\r
+       </target>\r
+       \r
+       <!-- Remove old screenshots if any -->\r
+       <target name="clean-old">\r
+               <subant target="remove-error-screens">\r
+                       <fileset dir="." includes="test.xml" />\r
+               </subant>\r
+       </target>\r
+</project>
\ No newline at end of file
index c841f8e03b1dbdab5c2dc1850bfba6a5d60ce051..213bd06f9a6be4ab06a55696b0d211401567dc3f 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="remove-error-screens, compile-tests">
+       <target name="run-tests" depends="compile-tests">
                <foreach maxthreads="10" parallel="true" target="execute-tests" param="target">
                        <path>
                                <fileset dir="${test-output-dir}" includes="**/**.java" />
        <!-- ================================================================== -->
 
        <!-- The default target. -->
-       <target name="run-and-clean-up" depends="check-parameters, run-tests,remove-temp-testclasses">
+       <target name="run-and-clean-up" depends="check-parameters,remove-error-screens,run-tests,remove-temp-testclasses">
        </target>
 
        <!-- Also starts the server. -->