--- /dev/null
+<?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