Skip to main content

/testchimp init — Bootstrap your repo

In brief: /testchimp init establishes enterprise-grade QA infrastructure and seeds default run-qa / upkeep policies agents reuse on every workflow run.

Init runs once after you install the TestChimp skill. It establishes the QA infrastructure and default workflow policies for the project. It is a skill bootstrap flow (not a catalog card on the Workflows list). When the workstation gate confirms MCP connectivity (get-eaas-config), the agent best-effort reports workflow init via report-agent-action (optional user id from MCP TESTCHIMP_USER_ID when present).

At a high level, init covers:

  • Environment provisioning strategy for pre–PR-merge E2E authoring (staging, previews, ephemeral full stack)—persisted for later connect-to-test-env policy work.
  • Default policies — Seeds run-qa.policy.md and upkeep.policy.md under plans/knowledge/policies/ when missing. Gates on a real connect-to-test-env policy (or a substantive Environment Provision Strategy)—without it many automation workflows show Missing config.
  • Seeding / teardown — Idempotent backend endpoints for creating and resetting test data, with non-production-only guards.
  • Mocking and doubles — HTTP/API interception (for example Playwright page.route) and optional LLM mocks where applicable.
  • Playwright fixtures — Shared setup in tests/fixtures/ so the same data posture applies at author time and execution time.
  • Test folder scaffold — Structure aligned with TestChimp (fixtures, seed/read helpers, runtime intelligence imports).
  • TrueCoverage — Optional RUM SDK wiring (web: @testchimp/rum-js; native: testchimp-rum-ios, testchimp-rum-android). Technical reference: Instrumenting your app.
  • CI — Actions for executing your E2E suite with reporting to TestChimp.

Install the skill

  • Clone testchimp-skills into your agent’s skills directory (for example ~/.cursor/skills/testchimp or .cursor/skills/testchimp) so SKILL.md loads and .git allows updates (git pull or /testchimp skill upgrade).
  • Restart the IDE or agent host if the skill does not appear immediately.
  • Add project-local MCP for @testchimp/cli with TESTCHIMP_API_KEY (see Workflows intro).

The skill expects Node.js and Playwright 1.59+ for SmartTests.

Connect git and map two folders

  1. In TestChimp → your project → Project SettingsIntegrationsGit, connect the repo.
  2. Map one folder to plans and one folder to tests.
  3. Sync so scaffold and markers land in git:
    • .testchimp-plans at the plans root
    • .testchimp-tests at the SmartTests root

See Code Repository — Overview. Until both markers exist, sync and coverage behaviour may be incomplete.

Dependencies and reporter

From the directory that contains .testchimp-tests:

  • Install @testchimp/playwright (reporting, natural-language steps, TrueCoverage correlation). See Playwright runtime plugin.
  • Install @testchimp/cli and register it in MCP config with TESTCHIMP_API_KEY.

Copy or merge the skill’s template playwright.config so the reporter is enabled and BASE_URL resolves for CI and local runs.

Policies seeded by init

FileRole
plans/knowledge/policies/run-qa.policy.mdDefault Run QA composite subflows
plans/knowledge/policies/upkeep.policy.mdDefault Upkeep composite subflows
plans/knowledge/policies/connect-to-test-env.policy.mdNot auto-seeded — author via /testchimp create policy connect-to-test-env (or copy the skill skeleton)

If ai-test-instructions.md already holds environment decisions, init can help migrate them into policies. Prefer policies going forward. See Workflows intro — Policies.

Optional: TrueCoverage (application instrumentation)

During init, the agent checks whether the RUM SDK is already wired and may ask whether to enable instrumentation now, defer, or skip. When enabled, init wires emit helpers and keeps plans/events/ aligned. Self-service: Instrumenting your app and later Instrument TrueCoverage.

Test harness: projects, seeding, fixtures

Init establishes a three-project Playwright layout under the tests root:

ProjectRole
setupRuns first; global seed / teardown and shared fixtures.
e2ePrimarily UI SmartTests.
apiPrimarily API tests.

Seed endpoints — Prefer idempotent backend endpoints; fixtures call them from test.extend. That shared posture is what Create tests and Run smart regression rely on.

Environments: persistent vs ephemeral

Init records an environment strategy (often starting in plans/knowledge/ai-test-instructions.md, then crystallizing in connect-to-test-env.policy.md): persistent staging vs ephemeral full stack, Bunnyshell / EaaS vs branch preview URLs, how CI sets BASE_URL. See Bunnyshell integration when applicable.

CI

Configure CI to run Playwright from the tests root (path with .testchimp-tests) with TESTCHIMP_API_KEY. Use a preview or deployed URL as BASE_URL for branch builds. Exclude plan-only sync PRs from must-pass automation rules if you use titles such as TestChimp Platform Sync [Plans].

End state

After init you should have: Git + two mappings, markers, reporter + MCP, Playwright projects, seed strategy (or explicit follow-ups), documented environment strategy, seeded run-qa / upkeep policies, a path to connect-to-test-env policy, optional TrueCoverage, and a skill marker that init completed.

Next: Run Run QA (/testchimp run QA or /testchimp test) when a change set is ready. For ongoing gap closure, use Upkeep.

FAQ

How often should I run /testchimp init?

Once per repository after Git mapping; re-run when major stack or environment changes require new fixtures, seeds, or instrumentation.

What does init configure for Playwright?

SmartTests folder structure, @testchimp/playwright reporter, installTestChimp fixtures, and CI workflow templates for standard Playwright runners.

Does init set up TrueCoverage?

Yes—it guides RUM SDK wiring on web/iOS/Android and Playwright test identity so production and test events align in TrueCoverage dashboards.