Playwright Adapter - 2026-10-19¶
Context¶
Playwright already ran as a command stage, but only if the user knew to add --reporter=junit, point PLAYWRIGHT_JUNIT_OUTPUT_FILE (or the config) at a file and repeat that path in junit_xml. Its HTML report was lost between runs, and workers did nothing. Playwright is the most common browser test runner people ask about, so it gets its own equipment.
Decision¶
equipment: playwrightmaps toPlaywrightAdapter(testo_core/frameworks/playwright_adapter.py). It runsnpx playwright test <args>and adds--reporter=list,junit,htmland--workers=N, each only whenargsdon't already set it.- Two optional adapter hooks, read with
getattrby the executor so other adapters are unaffected: stage_env(target_repo=, results_dir=)returns env that depends on the stage's paths. Playwright uses it forPLAYWRIGHT_JUNIT_OUTPUT_FILE,PLAYWRIGHT_HTML_OUTPUT_DIR(the stage's artifacts dir) andPLAYWRIGHT_HTML_OPEN=never. The stage's ownextra_envstill wins.default_junit_xmlgives the JUnit globs to import when the stage sets nojunit_xml. The import is the same onecommandstages use (Command Adapter and JUnit Import).native_report()returns the HTML report, so it is copied tostatic/history/<run_id>/native_reports/playwright/and linked from the run in the UI.- Default tier
e2e;playwrightis inPARALLEL_FRAMEWORKS;doctorandconfig validate --check-executableslook fornpx.
Consequences¶
- The target project installs
@playwright/testand its browsers itself; Testosterone adds no Node dependency. workers(default 4) overridesworkersinplaywright.config. Put--workersinargsto keep the config's value.- The JUnit file is written to
test-results/testo-junit.xmlin the target repo, Playwright's own output folder, which projects usually ignore already.