Differences between revisions 1 and 2
Revision 1 as of 2005-06-06 17:27:19
Size: 1813
Comment: started a new page for webtest
Revision 2 as of 2009-09-20 23:27:49
Size: 1817
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
- Target-audience: '''beginner-intermediate''' [[BR]]
- Target-role: '''QA/Test''' [[BR]]
- Target-release: 1.2.X[[BR]]
- Doc-status: '''draft''' [[BR]]
- Target-audience: '''beginner-intermediate''' <<BR>>
- Target-role: '''QA/Test''' <<BR>>
- Target-release: 1.2.X<<BR>>
- Doc-status: '''draft''' <<BR>>
Line 14: Line 14:
First, [http://webtest.canoo.com/webtest/manual/Downloads.html download] and [http://webtest.canoo.com/webtest/manual/install.html install] webtest. First, [[http://webtest.canoo.com/webtest/manual/Downloads.html|download]] and [[http://webtest.canoo.com/webtest/manual/install.html|install]] webtest.

- Target-audience: beginner-intermediate
- Target-role: QA/Test
- Target-release: 1.2.X
- Doc-status: draft

What you will get from this page

A quick intro to Canoo Webtest, how the basic tests for lenya works and how to make your own tests


Setup

First, download and install webtest.

How Canoo WebTest works

Canoo WebTest lets you specify test steps like

  • get the lenya welcome page
  • validate the page title to be Login Page
  • get the publication and login page
  • fill lenya in the username text field and levi in the password field
  • hit the ok button
  • validate the page title to be Home Page

This is how the first steps look in a webtest test (lenya_welcome.xml):

<?xml version="1.0" encoding="UTF-8"?>
<project name="SimpleTest" basedir="." default="main">
  
   <property webtest.home=/YOUR_WEBTEST_HOME/>
  
  <taskdef file="${webtest.home}/webtestTaskdefs.properties">
    <classpath>
      <fileset dir="${webtest.home}" includes="**/lib/*.jar"/>
    </classpath>
  </taskdef>
  
  <target name="main">
    <testSpec name="myTest">
      <config host="localhost" port="8080" protocol="http" basepath="lenya"/>
      <steps>
        <invoke stepid="load welcome page" 
         url="index.html"/>
        <verifyTitle stepid="we should see the welcome page of lenya cms" 
         text="Apache Lenya - Content Management System"/>
      </steps>
    </testSpec>
  </target>

</project>

You can invoke it by typing "sh bin/webtest.sh -buildfile /home/ren/src/myStuff/webtest/lenya_welcome.xml"

Webtests for Lenya's TestCases

TODO

WebTest (last edited 2009-09-20 23:27:49 by localhost)