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 are connected with Logic - combinations of AND, OR, and NOT, with parentheses to define evaluation order.

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 a certain value), a Right Value field is provided.

The Test Clauses are created in a table, and numbered from the top down.

Left Value

Operator

Right Value

Mode*

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

* Note that Mode is only available for individual tests when Comparison Mode is set to Specify Per Test.

Connecting Test Clauses: Logic

Multiple test clauses are connected with Logic, using AND, OR, and NOT in addition to parentheses to specify how the tests are evaluated to determine passing or failing.

Logic connectors can be edited by selecting options in the Logic column of the Test Clauses table, or may be edited directly using the Composite Expression parameter’s Edit button.

Usage Notes

  • Due to bulk mode processing, features may appear to output in chunks. Although feature order from a single output port remains intact, when chunks of features are output through both the Passed and Failed ports, unexpected results may occur in workspaces that rely on feature ordering from joined output ports. In these scenarios, we recommend that you do not upgrade the Tester to its 2019.1 or later version, or revise your workspaces so they do not rely on feature ordering from joined output ports.
  • 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 Community

The FME Community 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 Community.

 

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