Skip to main content

Test Tool Test Tool

One Tool Example

Test has a One Tool Example. Go to Sample Workflows to learn how to access this and many other examples directly in Alteryx Designer.

Use Test to verify data or processes in a workflow. Since the Test tool accepts multiple inputs, with a single Test tool you can create multiple tests and test multiple sets of data and processes. The tool notifies you with a descriptive error message if your test criteria are not met.

Use the Test tool to verify data before writing results to a database.

Configure the Tool

When the tool is first placed on the canvas, an empty list is displayed in the Configuration window.

Because this tool includes an expression editor, an additional input anchor displays when the tool is used in an app or macro workflow. Use the Interface tools to connect to a Question anchor.

Add New Test

To add a new test to the list...

  1. Select Add to open the Add Test window.

  2. Enter a test name in Test Name.

  3. Select Input Connection, and select the input connection to test.

  4. Select Test Type, and select a test.

    • Record Count Matches Specific Value: The test fails if the record count does not match the value entered in the Test Value field.

    • Record Count Matches Other Input's Record Count: The test fails if the record count in each input does not match the value entered in the Test Value field.

    • Expression is True for All Records: The test fails if one or more records do not match the expression entered in the Test Value field.

    • Expression is True for First Record: The test fails if the first record does not match the expression entered in the Test Value field.

  5. In Test Value, enter the value or use the dropdown to select the input you want to test.

  6. If Test Type is an expression, select the ellipses icon (...)to create an expression. Go to Expression Editor for more information.

  7. Select OK to confirm your new test.

Edit Existing Test

To edit an existing test...

  1. In the list, select the test and select Edit to open the Edit Test window. You can also double-click the test.

  2. Adjust the fields as desired.

  3. Select OK to confirm changes, or Cancel to revert to the original test configuration.

Delete Test

To delete an existing test...

  1. In the list, select the test.

  2. Select Delete. The test is deleted without a confirmation screen.

Errors in the Workflow

Before you run the workflow, use Don't report errors if there are other errors in the workflow to determine the error behavior of the workflow. The option is checked by default, so test errors only report if there are no other errors in the workflow.

If you want to see errors from the Test tool regardless of other errors in the workflow (for example, if you have known errors that you use for validation), you can uncheck the option to have the Test tool produce errors, regardless of errors being present in the rest of the workflow.