# Test & Run

The Test & Run statement allows you run an action if the action test state is true or false. When the action finishes you can continue, exit or stop. Exit stops execution of the current action. Stop cancels execution of all running actions and returns control to the user.

When you run the action, the current execution mode is by default preserved. This means that if the current action is being run stepwise, the new action will run stepwise. If the current action is being run grouped, the new action will run grouped. The Group option can be used to force the specified action to run grouped.

When Group is selected, you can choose to run the action only once. The effect is that only a single file is processed. This is useful when the action is processing data which is independent of the metadata in the tracks. For example you might be processing a query database or a list. This combination of options is similar to the Constrain Execution to a Single File statement.

You can specify that the named action is inline. When Inline is specified there must be a Start statement inside the current action with the specified name.

The Indirect option enables the use of Escape Sequences in the text field where you specify the name of the action to be run. This enables you to choose the action to be run based on the contents of any constructed pattern. The action name is only validated at run time. If the evaluated name is empty, no action will be run. You can setup lists using the various list statements to contain the names of actions; inline or not. By using the List Item At Index/Sublist statement, you can pull an action name and place it in a variable which can then be used by this statement.

Note that the statement is run once per set of files when run stepwise.