Canoo Webtest WebTest Canoo

Available Filter Steps

This is the syntax documentation for the Filter steps.

These are steps that are used to manipulate (or filter) the current response. They are typically used to change the content into a more suitable form for testing, for example, perhaps you wish to check the contents of a page which contains the current date. You can use a filter to remove the date from the page - hence the ever changing date part of the page will be gone and you will be left with a static page for testing purposes. The Filter steps are less tested than some of the Core steps and only have minimal documentation. They are subject to change in future builds.

To give you an example of a use case for filters, you may have a PDF file. You can use a filter to convert the content from a binary PDF file into extracted text. You could then select a portion of lines using a line selecting filter - perhaps something that matches a table. You could then use a regular expression filter to select a particular column of text from the table - perhaps a column of figures. You could then use scriptStep or groovy to add up the figures. You could then compare the result of ading up figures to some value extracted from somewhere else, e.g. elsewhere within the PDF, or from a web page or from a database table.

The main steps which make use of filters (in addition to the applyFilters step included here) are: verifyContent, storeLength and storeDigest.

In addition to the filter steps mentioned here, see also the following PDF filters: pdfToTextFilter, pdfToFontsFilter, pdfToBookmarksFilter and pdfToLinksFilter.

news

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