Run Action Step
The Run Action step invokes a reusable action — a shared sequence of steps defined once in the project and referenced from many test cases.
When to Use
- Reusing common setup (login, seed data) or teardown (cleanup, reset) sequences.
- Sharing complex step sequences without duplication.
- Composing library functions for frequently-used test patterns.
Why: Reusable actions follow the DRY principle. Update the action once and every caller gets the fix, and actions can be tested independently.
Quickest Scenario
- Define a reusable action under Project → Reusable Actions (e.g. Login as Admin).
- Add a Run Action step to a test case.
- In the Run Action panel, pick the action from the Action combo box.
- Provide Parameters values, then run. The action's steps execute inline and their Diagnostics appear in the panel.
Reusable Actions
A reusable action is a named sequence of steps stored in the automation project (under Reusable Actions). When you select an action, its local variables become the step's instance Parameters, pre-filled with name, type and value.
Configuration
The Run Action panel exposes:
| Field | Description |
|---|---|
| Action | The reusable action to run (combo box bound to ReusableActions). |
| Log Level | Verbosity for the invoked instance (LoadTestLogLevels). |
| Error Behavior | What happens when the action fails — default StopTestCase. |
| Description | Read-only Markdown description of the selected action. |
| Test Steps | Live list of the action's steps with status and information; disabled steps show (Disabled). |
| Diagnostics | Output of the currently selected inner step. |
| Parameters | Name/Value grid for the instance parameters passed into the action. Password-type values are masked. |
When the step runs, the action's parameters are synchronized into InstanceParameters and executed as a TestInstance. Output variables written by the action (e.g. via Data Transfer) are available to the calling test case.
Parameter Reference
| Property | Description |
|---|---|
Action / ActionId | The selected reusable action and its Id. |
InstanceParameters | ObservableCollection<Variable> passed to the action; types synced from the action's local variables. |
LogLevel | Logging verbosity of the executed instance. |
ErrorBehavior | TestErrorBehavior — default StopTestCase. |
The Run Action step is not supported inside a Shared Test Case (SharedTestCase) context.
Example
Reusable Action "Login as Admin":
Step 1: Send Request (POST /auth/login) Body: { "username": "${InputUsername}", "password": "${InputPassword}" }
Step 2: Data Transfer $.token → OutputToken
Test Case "Create user":
Step 1: Run Action "Login as Admin"
Parameters: InputUsername = ${AdminUser}, InputPassword = ${AdminPass}
Step 2: Send Request (POST /users)
Header: Authorization = Bearer ${OutputToken}
Step 3: Assert (Status Code = 201)