Generate Playwright Code
Generate code when your saved test describes the behavior you want to check. TestVibe uses the Assistant to inspect the app, write Playwright code, and verify it.
Select the saved test, confirm the environment, configuration and model, then follow the generation through to Playwright code you can read.
- Open the test in Tests and save any edits.
- Choose … → Generate. If code already exists, use … → Regenerate.
- Confirm the environment, configuration, and model in Generate test.
- Choose Generate to start.
- Read the conversation and answer any question that needs your input.
Make sure the environment is reachable and the variables or secrets named by your test exist. Generation uses workspace credits.
You can choose Run in background and continue using TestVibe. Reopen the test's View progress or Answer question action to return. Closing the conversation does not cancel the job.
After completion, read the outcome and open Code to review the saved test. A failed verification needs attention even if a file was written. Use the failure explanation and available evidence before retrying.
TestVibe generates Playwright code. You can inspect and edit it, but later regeneration may replace manual changes.
Next: Run your first test. For more detail, see Review generation progress.