Docs/Run Playwright While You Develop
#

Run Playwright While You Develop

Run Playwright while you develop

Two ways to run a test against a claimed sandbox before you push. Both need a sandbox you claimed.

Way 1, on your machine: your own Playwright (headed, --debug, --ui, codegen) against the sandbox's app. Point the harness's base-URL variable at a public port's URL (cofactor sandbox show <id>), or tunnel to any declared port, public or private, with a local address:

bash
cofactor sandbox forward <id> --port web

Way 2, in the sandbox's VM: the suite's own pinned toolchain runs the tests you last synced, as a dev run that never touches suite history, test health or alerts:

bash
cofactor sandbox sync <id>
cofactor test-suite run --suite <suite> --sandbox <id> --from-sandbox --external-grep "<title>"
cofactor test-suite executions --sandbox <id>

A test the catalog does not know yet is shown by its key. Restore the app's data between runs, and do not sync during one.

Forward limits, recipes and troubleshooting: https://docs.runcofactor.com/guides/run-playwright-against-a-sandbox