/testchimp import — Import existing tests
In brief: Import migrates an existing E2E suite into the mapped SmartTests folder—Playwright unchanged, other frameworks best-effort translated—then wires reporting, CI, scenario links, and optional
markScreenState.
Import is a One-Off catalog workflow (workflow-id: import). Run it standalone or nested under /testchimp init with one shared approval. There is no import.policy.md — decisions are interactive in the playbook.
Canonical prompt:
/testchimp import existing tests <existing tests folder>
When to use it
- You already mapped a tests folder in TestChimp and have an existing E2E suite (Playwright, Cypress, Selenium, WebdriverIO, Puppeteer, …) to bring under that root.
- You skipped import during init and want to migrate later.
- Init offers import only when the mapped folder still looks unmigrated (≤ 3 real specs outside
setup/and other E2E exists elsewhere)—so later teammates re-running init are not asked again.
What it does
- Discover — framework, source folder, mapped SmartTests root (
.testchimp-tests). - Import / translate — Playwright: move/align without changing test logic. Other frameworks: best-effort translate to Playwright
*.spec.{js,ts}. - Scaffold —
playwright.config.*inside the mapped folder from the skill template (@testchimp/playwright/reporter,screenshot: 'on',trace: 'retain-on-failure', setup project, fixtures-first imports). - CI — ask whether to create a separate Action/job or replace the existing test job; guide
TESTCHIMP_API_KEY(and backend URL) secrets. - Scenario links — keep existing TMS tags; add
// @Scenario: #TS-<n> …via external-id lookup (get-test-scenarios --external-ids) or high-confidence heuristic matches againstplans/scenarios/. - Optional
markScreenState— explain benefits (ExploreChimp / screen-state atlas); blocked untilconnect-to-test-envpolicy exists; sample ~20–30 distinct-area tests.
Nested under init
When init nests import, tasks land in the same init plan and workflow_execution_id. No second Plan → approve cycle.
Related
- Init — bootstrap; optional nested import
- Linking scenarios
- Screen-state annotations
- Run SmartTests in CI
- Skill playbook: import-existing-tests.md
FAQ
Does import rewrite Playwright tests?
No—existing Playwright logic stays as-is. The agent aligns config, reporter, and fixtures-first imports under the mapped SmartTests root.
What about Cypress or Selenium?
Best-effort translation to Playwright SmartTests, preserving user-visible journeys as faithfully as practical.
Can I run import after skipping it in init?
Yes—use /testchimp import existing tests <folder>. Nested under init it shares one approval with the init plan.