Skip to main content

Module model

Module model 

Source
Expand description

Core test model types: TestId, TestCase, TestSuite, TestPlan, TestOutcome, TestInfo, TestStep, SuiteMode.

Structs§

Attachment
An artifact attached to a test result.
HookDef
Hook registration for plan building.
HookRegistration
Unified hook registration metadata used by adapters before execution hooks are built.
Hooks
Lifecycle hooks attached to a suite.
ShardInfo
StepHandle
Handle to an in-progress step. Must be completed via end().
SuiteDef
Suite metadata for plan building.
TestCase
A single test case with metadata and body.
TestFailure
A test failure with diagnostic information.
TestFixtures
Unified fixture bag for test/step/hook callbacks.
TestHooks
Programmatic suite-level hooks supplied by the test author at runtime.
TestId
Globally unique test identifier.
TestInfo
Runtime test information accessible during test execution. Mirrors Playwright’s TestInfo interface.
TestModifiers
Runtime test modifiers set by test.skip(), test.fail(), test.slow() inside a test body. Shared via Arc between the NAPI layer (JS thread writes) and the Rust worker (reads after callback returns).
TestOutcome
Result of a single test attempt.
TestPlan
The full test plan after discovery + filtering + sharding.
TestPlanBuilder
Builds a TestPlan from flat test cases, suite definitions, and hooks.
TestStep
A structured test step (maps to Playwright’s test.step()).
TestSuite
A group of tests (maps to test.describe / #[cfg(test)] mod).

Enums§

AttachmentBody
ExpectedStatus
HookKind
Hook kind with the associated callback.
HookOwner
Where a hook attaches in the runner model.
HookPhase
Generic lifecycle phase shared across all front-end hook syntaxes.
HookScope
Generic lifecycle scope shared across E2E and BDD hooks.
StepCategory
Category of a test step.
StepStatus
Status of a completed test step.
SuiteMode
How tests within a suite are scheduled.
TestAnnotation
TestStatus
Status of a completed test.

Type Aliases§

HookFn
Test-scoped hook (before_each / after_each). Receives fixture pool + TestInfo. TestInfo provides access to test tags, name, step API, and event bus.
SuiteHookFn
Suite-scoped hook (before_all / after_all). Receives only the fixture pool. Runs once per suite per worker, no test context available.
TestFn
The async test body: takes a fixture pool, returns success or failure. Uses Arc so tests can be re-dispatched for retries and repeatEach.