Thin orchestrator for Playwright test execution with parallel worker support.
Owns the browser lifecycle, per-test loop (sequential or parallel), trace management, and final status transition. Delegates heavy sub-tasks to focused modules:
| Module | Responsibility |
|---|---|
runner/config.js |
Env constants, artifact dir setup |
runner/codeParsing.js |
extractTestBody (hasCode check) |
runner/executeTest.js |
Single-test execution |
runner/feedbackIntegration.js |
Post-run AI feedback loop |
Parallel execution
When parallelWorkers > 1, tests run in concurrent browser contexts within
a single Chromium instance. Each worker picks the next queued test, executes
it in its own isolated BrowserContext, and reports back. The shared browser
process keeps memory usage lower than launching N separate browsers.
Concurrency is controlled by:
PARALLEL_WORKERSenv var (default for all runs)- Per-run override via
options.parallelWorkers(from Test Dials / API)
Exports
runTests— Execute an array of approved tests against a project.
- Source:
Methods
(static) runTests(project, tests, run, optionsopt) → {Promise.<void>}
Execute an array of approved tests against a project using Playwright. Launches Chromium, runs each test with self-healing (optionally in parallel), collects results, saves traces/videos, runs the AI feedback loop, and finalises the run.
Parameters:
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
project |
Object | The project |
|||||||||||||||||||||||||||||||||
tests |
Array.<Object> | Array of test objects to execute. |
|||||||||||||||||||||||||||||||||
run |
Object | The run record (mutated in place). |
|||||||||||||||||||||||||||||||||
options |
Object |
<optional> |
Properties
|
- Source:
Returns:
- Type
- Promise.<void>