Aller au contenu principal

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​

  1. Define a reusable action under Project → Reusable Actions (e.g. Login as Admin).
  2. Add a Run Action step to a test case.
  3. In the Run Action panel, pick the action from the Action combo box.
  4. 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:

FieldDescription
ActionThe reusable action to run (combo box bound to ReusableActions).
Log LevelVerbosity for the invoked instance (LoadTestLogLevels).
Error BehaviorWhat happens when the action fails — default StopTestCase.
DescriptionRead-only Markdown description of the selected action.
Test StepsLive list of the action's steps with status and information; disabled steps show (Disabled).
DiagnosticsOutput of the currently selected inner step.
ParametersName/Value grid for the instance parameters passed into the action. Password-type values are masked.
remarque

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​

PropertyDescription
Action / ActionIdThe selected reusable action and its Id.
InstanceParametersObservableCollection<Variable> passed to the action; types synced from the action's local variables.
LogLevelLogging verbosity of the executed instance.
ErrorBehaviorTestErrorBehavior — default StopTestCase.
attention

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)

See Also​