Assert

Description

Tests a boolean condition. If the condition evaluates to false, reports an error with the specified message.

Signature

action/assert

Required Parameters

condition

Condition expression

Optional Parameters

message

Error message to report if the assertion fails. If omitted, a default message containing the condition expression is used.

To include the values of variables or arbitrary expressions in the message, you can use variable and expression interpolation (e.g. x = $x, y = ${y}, x+y = $(x+y)).

stop_on_failure

Default:

NO

If YES, the experiment will automatically stop if the assertion fails

Placement

Allowed at top level:

No

Allowed parent:

Block, Conditionally Execute Actions (if), List, On Exit, Protocol, Render Actions, Repeat Actions (while), Schedule Actions, Task System State, Trial, Unconditionally Execute Actions (else), Variable