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, [WWW] download and [WWW] install webtest.

How Canoo WebTest works

Canoo WebTest lets you specify test steps like

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

last edited 2005-06-06 17:27:19 by RenaudRichardet