Skip to main content

Module scenario

Module scenario 

Source
Expand description

Declarative TOML-based test scenario types. Scenario types for human-readable browser test case definitions.

Scenarios are written in TOML and describe groups of browser interaction tests with reusable assertion definitions and configurable test-level overrides.

§Structure

[config]                         # Global defaults
start_url = "/dashboard"

[[definitions]]                  # Reusable assertion definitions
name = "no_errors"
preset = "no_error_on_page"

[[test]]                         # Test group
name = "Dashboard Smoke"
start_url = "/dashboard"         # Override global start_url (optional)

[[test.steps]]                   # Ordered steps — the `kind` field
kind = "navigate"                # determines which other fields apply
url = "/dashboard"

[[test.steps]]
kind = "click"
target = "the Login button"      # Natural language — LLM resolves to selector

[[test.steps]]
kind = "assert"
definition = "no_errors"

§Step Kinds

kindRequired fieldsOptional fields
navigateurlwait_after_ms
clicktargetselector, wait_after_ms
typetarget, textselector, wait_after_ms
waittargetselector, timeout_ms
assertone of below
screenshotpath
agentagent, task
mcpserver, toolargs

Assert steps require one of: definition (references a named [[definitions]] entry), preset (built-in preset name), or prompt (custom LLM evaluation prompt).

Structs§

A2aServerConfig
A2A agent server exposure configuration.
AssertDefinition
Reusable assertion definition referenced by name from assert steps.
BudgetDef
A budget definition with limits and enforcement mode.
BudgetsConfig
Budget limits for test execution.
EndpointConfig
A named endpoint definition with pricing.
McpServerConfig
MCP server exposure configuration.
PricingConfig
Pricing configuration for an endpoint.
Scenario
Top-level scenario file, deserialized from TOML.
ScenarioConfig
Global scenario configuration with per-test overridable fields.
TestGroup
A group of steps that form a single test scenario.

Enums§

BudgetEnforcement
Budget enforcement strategy.
EndpointType
Type discriminator for endpoint configuration.
TestStep
A single step in a test. The kind field determines which variant is deserialized and which field constraints apply.