diff options
author | Jouni Koivuviita <jouni.koivuviita@itmill.com> | 2009-05-08 12:50:26 +0000 |
---|---|---|
committer | Jouni Koivuviita <jouni.koivuviita@itmill.com> | 2009-05-08 12:50:26 +0000 |
commit | f03b6c391124875a141180acce2d86f3544ecfe6 (patch) | |
tree | eee0dbc3c09eaffc0a4a60c36a2f66517ffcd96d | |
parent | b3b2464a4e6dadd4e2790d042d202ade54b64d87 (diff) | |
download | vaadin-framework-f03b6c391124875a141180acce2d86f3544ecfe6.tar.gz vaadin-framework-f03b6c391124875a141180acce2d86f3544ecfe6.zip |
Merges from 6.0 branch.
svn changeset:7685/svn branch:theme_2009_03
-rw-r--r-- | WebContent/WEB-INF/web.xml | 6 | ||||
-rw-r--r-- | tests/sampler/smoketest.html | 177 | ||||
-rw-r--r-- | tests/test.html | 177 | ||||
-rw-r--r-- | tests/test.xml | 130 |
4 files changed, 485 insertions, 5 deletions
diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index f702c484b6..636295d26b 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -34,11 +34,7 @@ <servlet> <servlet-name>ITMillToolkitApplicationRunner</servlet-name> - <servlet-class>com.itmill.toolkit.terminal.gwt.server.ApplicationServlet</servlet-class> - <init-param> - <param-name>applicationRunner</param-name> - <param-value>true</param-value> - </init-param> + <servlet-class>com.itmill.toolkit.terminal.gwt.server.ApplicationRunnerServlet</servlet-class> </servlet> diff --git a/tests/sampler/smoketest.html b/tests/sampler/smoketest.html new file mode 100644 index 0000000000..8f1c5f224d --- /dev/null +++ b/tests/sampler/smoketest.html @@ -0,0 +1,177 @@ +<?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</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">test</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/sampler?restartApplication</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IPanel[0]/IGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[0]/IHorizontalLayout[0]/ChildComponentContainer[6]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[0]/IHorizontalLayout[0]/ChildComponentContainer[6]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[0]/IHorizontalLayout[0]/ChildComponentContainer[6]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/ITextField[0]</td> + <td>test</td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/ITextField[1]</td> + <td>last name</td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>verifyTextPresent</td> + <td>First name: <br />Last name: <br />Country: <br />Birthdate: null<br />Shoe size: 42</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IPasswordField[0]</td> + <td>pwd</td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/domChild[0]/domChild[3]/domChild[0]</td> + <td>Please enter a password</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/domChild[0]/domChild[3]/domChild[0]</td> + <td>Password must be 6-20 characters</td> +</tr> +<tr> + <td>type</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IPasswordField[0]</td> + <td>pwd1111</td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>verifyTextPresent</td> + <td>First name: test<br />Last name: last name</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/tests/test.html b/tests/test.html new file mode 100644 index 0000000000..8f1c5f224d --- /dev/null +++ b/tests/test.html @@ -0,0 +1,177 @@ +<?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</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">test</td></tr> +</thead><tbody> +<tr> + <td>open</td> + <td>/sampler?restartApplication</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IPanel[0]/IGridLayout[0]/AbsolutePanel[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[0]/IHorizontalLayout[0]/ChildComponentContainer[6]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[0]/IHorizontalLayout[0]/ChildComponentContainer[6]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[0]/IHorizontalLayout[0]/ChildComponentContainer[6]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/ITextField[0]</td> + <td>test</td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/ITextField[1]</td> + <td>last name</td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>verifyTextPresent</td> + <td>First name: <br />Last name: <br />Country: <br />Birthdate: null<br />Shoe size: 42</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IPasswordField[0]</td> + <td>pwd</td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/domChild[0]/domChild[3]/domChild[0]</td> + <td>Please enter a password</td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>assertText</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/domChild[0]/domChild[3]/domChild[0]</td> + <td>Password must be 6-20 characters</td> +</tr> +<tr> + <td>type</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IPasswordField[0]</td> + <td>pwd1111</td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[0]/IForm[0]/IFormLayout[0]/IFormLayout$IFormLayoutTable[0]/IHorizontalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>vaadin=sampler::/IVerticalLayout[0]/ChildComponentContainer[1]/ISplitPanelHorizontal[0]/IHorizontalLayout[0]/ChildComponentContainer[0]/IVerticalLayout[0]/ChildComponentContainer[1]/IVerticalLayout[0]/ChildComponentContainer[1]/IButton[0]</td> + <td></td> +</tr> +<tr> + <td>waitForVaadin</td> + <td></td> + <td></td> +</tr> +<tr> + <td>verifyTextPresent</td> + <td>First name: test<br />Last name: last name</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/tests/test.xml b/tests/test.xml new file mode 100644 index 0000000000..7c5f8ac250 --- /dev/null +++ b/tests/test.xml @@ -0,0 +1,130 @@ +<?xml version="1.0"?> + +<project name="Testing Testing Tools" basedir="." default="run-and-clean-up"> + <!-- ================================================================== --> + <!-- Configuration --> + <!-- ================================================================== --> + <property name="lib.dir" value="../lib/testingtools" /> + <property name="class-dir" value="../build/classes" /> + <property name="test-output-dir" value="../build/test-output" /> + <property name="test-browsers" value="firefox,ie" /> + + <path id="classpath"> + <fileset dir="${lib.dir}" includes="**/*.jar" /> + <pathelement path="${class-dir}" /> + </path> + + <fileset dir="../tests" id="html-test-files"> + <include name="**/*test**.html" /> + </fileset> + + <!-- ================================================================== --> + <!-- Building Tests --> + <!-- ================================================================== --> + + <target name="create-tests"> + <fileset id="tests"> + <include /> + </fileset> + <pathconvert pathsep=" " property="testfiles" refid="html-test-files" /> + + <java classname="com.vaadin.testingtools.util.TestConverter" classpathref="classpath"> + <arg value="${test-output-dir}" /> + <arg value="${test-browsers}" /> + <arg line="${testfiles}" /> + </java> + </target> + + <target name="compile-tests" depends="create-tests"> + <mkdir dir="${class-dir}"/> + <javac srcdir="${test-output-dir}" destdir="${class-dir}" debug="on"> + <classpath> + <path refid="classpath" /> + </classpath> + </javac> + </target> + + <!-- ================================================================== --> + <!-- Toolkit Server Management --> + <!-- ================================================================== --> + + <target name="server-start"> + <fail unless="package.name" message="The 'package.name' property must be defined."/> + <fail unless="package.filename" message="The 'package.filename' property must be defined."/> + <fail unless="testing.testarea" message="The 'testing.testarea' property must be defined."/> + + <echo>Package name: ${package.name}</echo> + <echo>Package filename: ${package.filename}</echo> + <echo>Testing area: ${testing.testarea}</echo> + + <exec executable="python" searchpath="true" dir=".." resultproperty="server.start.result"> + <arg value="build/testing/toolkit-server.py"/> + <arg value="start"/> + <arg value="${package.name}"/> + <arg value="${package.filename}"/> + <arg value="${testing.testarea}"/> + </exec> + + <condition property="server.start.succeeded"> + <equals arg1="${server.start.result}" arg2="0"/> + </condition> + </target> + + <target name="server-stop"> + <exec executable="python" dir=".." searchpath="true" resultproperty="server.stop.result"> + <arg value="build/testing/toolkit-server.py"/> + <arg value="stop"/> + </exec> + </target> + + <!-- ================================================================== --> + <!-- Running Tests --> + <!-- ================================================================== --> + + <target name="check-parameters"> + <fail unless="testingtools.tester.host" message="The 'testingtools.tester.host' property must be defined."/> + <fail unless="testingtools.deployment.url" message="The 'testingtools.deployment.url' property must be defined."/> + </target> + + <target name="run-tests" if="server.start.succeeded" depends="execute-tests"> + </target> + + <target name="execute-tests" depends="compile-tests"> + <junit fork="yes"> + <classpath> + <path refid="classpath" /> + </classpath> + <jvmarg value="-Dtestingtools.tester.host=${testingtools.tester.host}" /> + <jvmarg value="-Dtestingtools.deployment.url=${testingtools.deployment.url}" /> + + <batchtest> + <fileset dir="${test-output-dir}"> + <include name="**/**.java" /> + </fileset> + </batchtest> + </junit> + + </target> + + <target name="remove-temp-files"> + <!-- test java files --> + <delete> + <fileset dir="${test-output-dir}"> + <include name="**/**.java" /> + </fileset> + </delete> + </target> + + <!-- ================================================================== --> + <!-- Main Targets --> + <!-- ================================================================== --> + + <!-- The default target. --> + <target name="run-and-clean-up" depends="check-parameters, run-tests,remove-temp-files"> + </target> + + <!-- Also starts the server. --> + <target name="test-package" depends="server-start, run-and-clean-up, server-stop"> + </target> + +</project> |