Canoo Webtest WebTest Canoo

Building WebTest

This page describes how to build webtest from the sources. The build file included with the source provides a complete and repeatable build process, which the second section explains. The build file is used by the build server to produces high quality deliveries but can, and should, also be used to develop WebTest. It is however convenient during development to build webtest from the comfort of an IDE, and the third section gives a few hints on ow to set-up an IDE.


A platform that is able to run Java.
An installed JDK version 6 or higher.
Ant, version 1.8.4 or newer.
The distributions of webtest contain the necessary part from ant 1.8.4 ready to run.

Building WebTest with ant

Rebuilding the whole Canoo WebTest from the source may be an option if you want to change it's behavior.

First, checkout the latest version from the svn repository to <WEBTEST_HOME> :

git clone
git clone

Then call the build script. Depending from your operating system, it may be necessary to fiddle with the execution rights of the scripts in the directory bin/ .

The main build file in <WEBTEST_HOME> provides the following targets:

Deletes (most of) the results of a previous build.
Compiles and tests webtest.
Compiles and tests webtest, then generates all kinds of documentations and reports.
This is the target used by the build server.
Lets maven fetch all the dependencies described in the pom. This target needs only to be called explicitly if the build will occur offline.

To generate a complete release, including the documentation, type:

bin/ full

To get a clean build without documentation, type:

bin/webtest clean develop

Building with an IDE

As there are too many possible IDEs, this section only outlines how to set-up an IDE.

Although webtest build is an ant script, it is taking advantage of Maven 's (version 2) declarative definition of dependencies: All dependencies required to build and run webtest are defined in the file pom.xml . The target fetchDependencies of the build script looks at the required dependencies, looks at maven's dependency cache (in the user's home directory) and downloads the dependency jar files from one of the maven repositories to the shared dependency cache.

Since the actual dependency jar files are not part of the module, but potentially shared with other unrelated projects, the difficulty is to tell the IDE which jar files it needs and where they are. The easiest solution is to take advantage of maven's various plugins to convert webtest's pom.xml to a project file for an IDE. This requires of course maven (version 2!) to be available on the machine.

Note that some dependencies are indeed part of webtest's module: these are jar files for versions that are not (yet?) available on a public maven repository. These jar files are however organized as a local maven repository and accessed like every other dependencies.

IntelliJ IDEA

To create an Idea project, just use:

mvn idea:idea


To create an eclipse project, just use:

mvn eclipse:eclipse

Note that working with the generated project-files in eclipse requires to define a new classpath variable named M2_REPO which leads to your local maven repository. It must be defined under preferences -> java -> build path .


Latest build: development
Posted: 19-Jul-2016 17:36

WebTest 3.0 released, featuring upgrades to Java 5, Groovy 1.6, and HtmlUnit 2.4.
The release includes support for maven integration, IDE-integration like for unit tests, capturing of background JavaScript errors, new steps for mouseOver and mouseOut events, better parallel execution of tests and - as usual - lots of handling improvements.
Posted: 5 March 2009

WebTest @ JavaOne
Dierk König presented "Functional testing of web applications: scaling with Java" on Wed May 7, 13:30 at JavaOne 2008 in the Tools and Scripting Languages track.
Posted: 8 May 2008

New WebTest screencast available:
Data Driven WebTest
Posted: 13 November 2007

First WebTest screencast available:
Creating a first Webtest Project

Extend WebTest with Groovy! Groovy in Action is available in every good bookstore.
Groovy in Action
Posted: 29 January 2007