YAML document shape
Every YAML file is a document. Documents without a scenarios key are ignored.
# Optional document-level fields
tags: [] # e.g. todo, only
roles: [] # host: login as these roles (needs hooks.login)
setup: {} # host fixtures / static placeholder data
setup_login: owner # host: login as a named setup user key
teardown: {} # host cleanup (needs hooks.teardown)
scenarios:
- scenario: Human-readable title (becomes the Playwright test name)
tags: [] # scenario-level tags (e.g. todo)
require: [] # skip unless each expanded expression is truthy
vars: {} # name → value; values support {placeholders}
steps:
- … # ordered steps
Tags
| Tag | Effect |
|---|---|
todo | Document or scenario is skipped |
only | If any loaded doc has only, every doc without only is skipped |
tags may be a string or a list.
Document / scenario keys
scenarios, scenario, steps, tags, vars, require, roles, setup, setup_login, teardown.