Skip to main content

Module worker

Module worker 

Source
Expand description

Worker: owns a browser instance, executes hooks, creates fresh context+page per test.

Hook execution model (matching Playwright):

  • beforeAll: once per suite PER WORKER, tracked in active_suites map
  • afterAll: when worker finishes, for every suite that had beforeAll run
  • beforeEach: before every test, gets the test’s fixture pool
  • afterEach: after every test (even on failure), gets the test’s fixture pool

Serial batches: all tests run in order on this worker. On first failure, remaining tests are skipped but afterAll still runs.

Structs§

Worker
A worker that owns a browser and processes tests sequentially.
WorkerTestResult
Result of a single test execution within a worker.