Migrate from Playwright
Playwright is a great automation library, but spec files come with a maintenance tax: selectors break when the UI changes, waitFor calls accumulate to fight flakiness, and every refactor of your frontend means a refactor of your tests.
TesterArmy tests are written as natural-language steps. An AI agent with vision executes them against your app, so a renamed data-testid or a redesigned login form doesn’t break anything. The fastest way to migrate is to let your coding agent (Claude Code, Cursor, Codex) read your existing specs and convert them using the TesterArmy CLI.
How concepts map
What translates and what doesn’t
Most end-to-end specs translate directly: the user intent in your test() bodies becomes act and assert steps, and selectors are simply dropped.
A few things don’t carry over:
- Network mocking (
page.route()) - TesterArmy tests run against a real environment, so point them at staging or preview deployments instead of mocks. - Component tests and API-only tests - keep these in Playwright; TesterArmy is for end-to-end user flows.
- Heavily parameterized tests - convert the representative cases, not all 50 generated variants.
Prerequisites
Get an API key from the dashboard. For non-interactive agent sessions, set TESTERARMY_API_KEY instead.
The migration prompt
Paste this into your coding agent in the repository that contains your Playwright tests:
After the migration
- Review the migrated tests in the dashboard - step titles should describe intent, not implementation.
- Add credentials for any login flows the agent flagged.
- Organize tests into groups and wire them into CI with group webhooks or
ta tests run --group <groupId>- see Pull Request Testing. - Keep Playwright around for component or API tests if you have them; delete the end-to-end specs once the TesterArmy runs are green.
