Integration · Test framework · via REST API
Refresh the test database before your Playwright suite starts. A setup project calls the Synthesized REST API with Playwright's own request fixture, waits for the workflow, and stops the run if the data isn't ready.
There is no Playwright plugin; this pattern uses the documented REST API and Playwright's documented setup projects.
| Where the call goes | A setup project that your browser projects list in dependencies, so it runs first and appears in the report. |
|---|---|
| How it connects | request.post starts the workflow; expect.poll checks workflow_run_status until it is final. |
| Configuration | GOVERNOR_URL, WORKFLOW_ID and GOVERNOR_ACCESS_KEY as environment variables. |
| Best for | Suites that own their test environment and need production-like data that is safe to use. |
| Status | Works through the REST API. Playwright isn't named in the Synthesized docs; the API calls are. |
Create the masking, subsetting or generation workflow that fills your test database, and run it once by hand.
Set GOVERNOR_URL, WORKFLOW_ID and GOVERNOR_ACCESS_KEY in the environment, from your CI secret store.
Add the test-data project and the setup file below, and list it in each browser project's dependencies.
npx playwright test now refreshes the data first. If the run fails, the dependent projects don't start.
playwright.config.ts
tests/test-data.setup.ts
An access key carries the permissions of the Governor user who generated it. Create a user that can reach only the workflows this pipeline runs, generate the key as that user, and give it a short expiry: keys are chosen from 1 hour to a year, and the docs say they can't yet be revoked.
Two runs can't write to the same output database at the same time. If parallel pipelines or branches need data, give each environment its own workflow or output database.
Workers read the source, mask, subset or generate, and write the target. Database contents stay with the workers and aren't sent to Governor, which, like the pipeline, only sees run status, logs and configuration. Run Synthesized on-premises, including air-gapped, and the data never leaves your environment; it is also available as SaaS.
No. A setup project calls the Synthesized REST API, so it works with any Playwright setup that can reach your Governor over HTTPS. You need an HTTP client (the example uses Playwright's request fixture), the Governor URL, a workflow ID and an access key.
Playwright recommends project dependencies: the setup shows in the HTML report, records traces, and can use fixtures such as request. globalSetup works too, but without those features.
If several suites share the test database, refresh it once in the pipeline before any of them run. If Playwright owns the environment, the setup project keeps everything in one place.
The setup project runs once, before the projects that depend on it, so all workers share the refreshed database. Keep tests independent by giving each test or worker its own records.
In an environment variable set by your CI secret store. Don't commit it to the test project.
Bring one Playwright suite that depends on production-like data, and see Synthesized prepare it before the run.
All product names, including Playwright, are trademarks of their respective owners.