svn changeset:7644/svn branch:6.0tags/6.7.0.beta1
@@ -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> |
@@ -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> |