Skip to main content

Actions (Reusable Step Groups)

Actions are named groups of steps that can be called from any test. They reduce duplication and make tests easier to maintain.

Defining an Action

Create a YAML file in .devassure/actions/:

# .devassure/actions/login_as_admin.yaml
name: login_as_admin
description: Login to the app as admin using Google
steps:
- Open admin portal url
- Click on Google login button
- Enter admin email and password
- If MFA is asked, enter the authenticator OTP
- If allow access is asked, click on allow access
FieldDescription
nameUnique identifier used to call the action from a test
descriptionShort description of what the action does
stepsOrdered list of natural-language steps

Using an Action in a Test

Reference the action by name in your test's steps list:

steps:
- login_as_admin
- add_manager_user
- Open users list page
- Verify if the manager user is added

Adding Actions from the Sidebar

  • In the Tests view, the actions tree is shown when .devassure/actions/ exists.
  • Right-click the actions root or a folder → Add Action to create a new action YAML from a template.