You are here: Filters and Joins > Tester

Tester

Evaluates one or more tests on a feature, and routes the feature according to the outcome of the test(s).

Jump to Configuration

Typical Uses

  • Performing quality testing on data
  • Dividing features into two streams based on a test
  • Isolating a subset of features based on a test

How does it work?

The Tester accepts any feature. It evaluates each feature against one or more user-defined tests, and outputs the feature via the Passed port if it meets the defined conditions, or via the Failed port if it fails the defined conditions.

The tests are constructed as a series of Test Clauses, which evaluate values or expressions based on a wide range of available Operators and test types. The Test Clauses can be combined with AND, OR, or more granularly with a Composite Test. Conditions may also be negated (testing for the opposite result).

Creating Test Clauses

Each clause is composed of a value to test, and the method of testing it. Depending on the type of test, at a minimum the clause will consist of a Left Value and an Operator. If the chosen Operator needs more information (for example, testing for an attribute that is greater than certain value), a Right Value field is provided.

The Test Clauses are created in a table, and numbered sequentially.

Left Value

Operator

Right Value

Negate

Mode

The value or expression to test The type of test to perform The value for comparison, if required by the operator Reverse the test results (test for the opposite condition) Test the values in a specific manner
Examples
Latitude > 49.000001   Automatic
@Area() In Range (1,100)   Numeric
Type Like Kebabs   Case Sensitive
Traffic Attribute Is Null <Unused> X Automatic
Count Type Is Integer   Automatic

Usage Notes

  • If you have several Tester transformers in sequence, consider using the TestFilter instead. This transformer allows you to create a series of tests with named output ports for each result.
  • When filtering out a subset of features, consider the logic of the test(s) when choosing an output port. For example, to remove all of the Dog Parks from a list of parks, you could either:
    • Set DogParks=Y, and connect the Failed port (dropping the Passed features), or
    • Set DogParks=N, and connect the Passed port (dropping the Failed features).

Configuration

Input Ports

Output Ports

Parameters

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Defining Values

There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies None
FME Licensing Level FME Base Edition and above
Aliases
History This transformer replaced the AttributeTester and GenericTester transformers.
Categories

Data Quality

Filters and Joins

FME Knowledge Center

The FME Knowledge Center is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

Search for all results about the Tester on the FME Knowledge Center.

 

Examples may contain information licensed under the Open Government Licence – Vancouver