Migrate from other tools
Already have a test suite? molar migrate converts existing end-to-end tests into .molar.md scenarios so you keep your coverage while gaining self-healing, Clones, Guard PR gating, and Trace replay.
Note:
You don't have to migrate everything at once. Molar runs .molar.md scenarios and compiled Playwright side by side — migrate your flakiest or highest-value flows first and leave the rest untouched.
Supported sources
| From | Command | Notes |
|---|---|---|
| Playwright | molar migrate --from playwright <glob> | Selectors and assertions map directly; test.step → scenario steps |
| Cypress | molar migrate --from cypress <glob> | cy.* commands translated; custom commands flagged for review |
| Selenium | molar migrate --from selenium <glob> | WebDriver calls → intents; explicit waits become assertions |
| Puppeteer | molar migrate --from puppeteer <glob> | Page actions mapped; network stubs suggested as Clones |
| Mabl | molar migrate --from mabl <export> | Import a Mabl journey export |
How it works
molar migrate --from playwright "tests/e2e/**/*.spec.ts" --out .molar/scenarios --json
- Parse — each source test is parsed into an intermediate action graph.
- Lift to intents — brittle selector chains become plain-English intents (
click the "Checkout" button) that the agent re-grounds at run time. This is what makes migrated tests self-heal. - Detect vendors — outbound calls to Stripe, Twilio, email, auth, and S3 are flagged and wired to Clones so migrated tests run hermetically.
- Emit
.molar.md— one scenario file per source test, with a# Migrated fromprovenance header. - Report — anything that couldn't be translated cleanly is listed with a
TODO(review)marker instead of being dropped silently.
{
"ok": true,
"migrated": 42,
"needs_review": 3,
"out_dir": ".molar/scenarios",
"review": [
{ "file": "tests/e2e/upload.spec.ts", "reason": "custom fixture not resolvable" }
]
}
After migrating
molar scenarios validate # lint the generated .molar.md
molar scenarios compile # back to Playwright, now self-healing
molar run # execute via the Guard runner
Then commit the scenarios and install the Guard GitHub App to gate every PR.
Review checklist
- Confirm
TODO(review)markers — custom commands, non-deterministic fixtures, and third-party stubs need a human pass. - Replace network stubs with the matching Clone for stateful, vendor-faithful behavior.
- Set auth aliases so logins resolve through Clones or agent comms OTP.