Previous Topic: Verify AssetsNext Topic: Add a Filter


Filters

A filter is an element that runs before and after a test step, enabling you to change the data in the result, or to store values in properties. Use filters to extract values from web pages, XML and DOM responses, Java objects, text documents, or other test step responses.

Most filters execute after the step runs.

After the data has been filtered, the data can be used in an assertion, or in any subsequent test step. Filters usually operate on the response of the system under test. For example, filters are used to parse values from an HTML page, or to perform conversions on the response. Filters can also be useful in other places. Filters can be used to save a property value to a file, or convert a property to be the "last response". Filters are used mainly to set properties.

A filter can be applied as a global filter or as a step filter. The available filter types are the same, but how the filters are applied differs.

Global filter

A global filter is defined at the test case level and executes before or after test steps that are not set to ignore global filters. You can set a step to ignore global filters in the Step Information element of the step.

Step filter

A filter that is defined at the test step level is a step filter, and executes before or after each execution of that test step.

You can add as many global and step filters as necessary. The filters are executed in the order that they appear in the test case.

The following topics are included.

Add a Filter

Drag and Drop a Filter