Skip to main content

YAML Step ReferenceDirect link to YAML Step Reference

Use this page when generating .devassure/tests/*.yaml. Write Tests covers how to add files. This page is the schema and phrasing catalog.

O2 does not parse a keyword DSL. There is no closed verb list that the CLI rejects. Each step is plain English that the agent executes against the live page. The patterns below are the forms used in official examples — prefer them so generated tests stay unambiguous.

Do not put CSS selectors, XPath, test IDs, or Playwright/Cypress code in steps.


Test case schemaDirect link to Test case schema

Files live under .devassure/tests/ as .yaml or .yml.

FieldRequiredTypeNotes
summaryYesstringOne-line intent. Shown in reports and used by filters/--query.
stepsYeslist of stringsOrdered. Each item is one action, one assertion, or one action name.
priorityNoP0 | P1 | P2 | P3Reporting and --priority filters. Does not change execution order.
tagsNolist of stringsFor --tag filters (e.g. smoke, regression, login).
summary: Login and verify dashboard
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify dashboard loads and shows admin menu
- Log out
priority: P0
tags:
- smoke
- login

Several cases in one file — only when they belong to the same feature. Use a top-level YAML list:

- summary: Login and verify dashboard
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify dashboard loads and shows admin menu
priority: P0
tags: [smoke, login]

- summary: Login welcome message includes the user name
steps:
- Open the application url
- Log in with admin credentials from test data
- Verify the welcome message contains the user name
priority: P2
tags: [login]

CSV uses the same fields as columns (Summary, Steps, Priority, Tags unless remapped in csv_mapping.yaml). See Write Tests.


Step rulesDirect link to Step rules

  • One action or assertion per line. Do not combine "click Save and verify success" in a single step.
  • Intent, not implementation. Write Click Search, not click the button with id #search-btn.
  • Do not hardcode the environment URL. Use Open the application url / load the url. The base URL comes from test_data.yaml or --url.
  • Pull credentials and fixtures from test data. Write Log in with admin credentials from test data, not a pasted password.
  • End every case with at least one verification. A flow with no Verify / Validate step has no pass/fail signal.

PatternExample
Open the appOpen the application url
Open a named surfaceOpen the users list page
Open a portalOpen admin portal url
Load (Cloud Agent phrasing)load the url
NavigateNavigate to checkout
Navigate to a formNavigate to the property creation form
Go backClick the back button to return to the property list

InputDirect link to Input

PatternExample
Enter into a labeled fieldEnter test-user@example.com in Email
Enter a value as a fieldEnter "Sunset Villa" as the property name
Enter from test dataEnter admin email and password
Fill a flowenter a destination
Select an optionSelect "Available" as the status
Select a saved valueSelect the saved payment method

Clicks and UI actionsDirect link to Clicks and UI actions

PatternExample
Click a labeled controlClick Login
Click on a named controlClick on Google login button
Click a resultClick on the first property in the list
Click Save / CreateClick Save
Log in / log outLog in with admin credentials from test data
Wait for UIWait for the property list to load

ConditionalsDirect link to Conditionals

Use If …, … when the UI may or may not appear:

- If MFA is asked, enter the authenticator OTP
- If allow access is asked, click on allow access

Enable the authenticator library tool when OTP is required. See Library Tools.


AssertionsDirect link to Assertions

Start assertion steps with Verify, Verify that, Verify if, or Validate.

Presence and loadDirect link to Presence and load

PatternExample
Page loadedVerify if the page loads successfully
Screen shownVerify Dashboard is displayed
Element shownVerify that the property detail view opens
Empty / negativeVerify that no properties are displayed
Negative visibilityVerify UPI option is NOT visible
ReappearanceVerify UPI option becomes visible again

ContentDirect link to Content

PatternExample
Contains textVerify the welcome message contains the user name
Exact listingVerify that the newly created property appears in results
CountVerify that the property count shows 2 results
Field valuesVerify that the property price is displayed
Computed valuesVerify Total due today equals (subtotal - discount) + tax

Errors and APIsDirect link to Errors and APIs

PatternExample
No UI errorsVerify if there are no error messages
ConsoleVerify that there are no blocking console errors
APIVerify that the login API returns success
Validation failedVerify that validation errors are displayed for the required fields
Form did not submitVerify that the form does NOT submit successfully

Business outcomesDirect link to Business outcomes

PatternExample
Results match inputvalidate the search results are inline with the data entered
Combined filtersVerify that the results show properties matching ALL filters
Policy / copyVerify the reply explains the refund rules in plain language

Reusable actionsDirect link to Reusable actions

Actions are named step groups in .devassure/actions/. Call them by exact name as a step.

# .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
# in a test
steps:
- login_as_admin
- Open users list page
- Verify if the manager user is added
FieldRequiredDescription
nameYesIdentifier used as a step in tests
descriptionYesWhat the action does
stepsYesSame natural-language steps as tests

See Reusable Actions.


What not to writeDirect link to What not to write

# Wrong — selectors / automation API
- Click #login-btn
- page.locator('[data-testid=email]').fill('user@test.com')
- xpath=//button[@type='submit']

# Wrong — URL belongs in test_data.yaml or --url
- Open https://staging.myapp.com/login

# Wrong — two intents in one step
- Click Save and verify the success toast
# Right
- Open the application url
- Enter the default user email from test data in Email
- Click Login
- Verify dashboard loads and shows admin menu