Skip to main content

/testchimp init — Bootstrap your repo

Init run once after you install the TestChimp skill. It establishes the whole QA infrastructure for the project.

At a high level, init covers:

  • Environment provisioning strategy for pre–PR-merge E2E authoring (what runs where: staging, previews, ephemeral full stack).
  • Seeding / teardown — Setup idempotent backend endpoints for creating and resetting test data; if they do not exist yet, init plans creating them with clear non-production-only guards.
  • Mocking and doubles — Document HTTP/API interception (for example Playwright page.route) and optional LLM mocks where applicable, so agents do not “fix” flakes by skipping real contracts you care about.
  • Playwright fixtures — Shared setup in tests/fixtures/ (merged with mergeTests) so the same data posture applies at author time and execution time, cutting flakiness due to state drift.
  • Test folder scaffold — Setup test folder structure aligned with TestChimp (fixtures, seed/read helpers, proper imports to hook runtime intelligence etc.).
  • TrueCoverage — When you opt in, setup user-event emits from the app (web: @testchimp/rum-js; native: testchimp-rum-ios, testchimp-rum-android) so SmartTest runs and production traffic both feed behaviour-aligned coverage. Technical reference: Instrumenting your app.
  • CI — Properly configured CI actions for executing your E2E suite, with reporting to TestChimp enabled to drive insights.

Install the skill

  • Clone testchimp-skills into your agent’s skills directory (for example ~/.cursor/skills/testchimp or .cursor/skills/testchimp in the repo) so SKILL.md is loaded and .git allows git pull updates.
  • Restart the IDE or agent host if the skill does not appear immediately.

The skill expects Node.js and Playwright 1.59+ for SmartTests. For API and analytics, set TESTCHIMP_API_KEY (project key) where the MCP server runs—typically the project-scoped MCP config (not only a local .env), since keys are per TestChimp project.

Connect git and map two folders

TestChimp always thinks in terms of plans and tests on the platform side. In your repository, those can be any two directories (for example docs/plans and qa/ui_tests). See Git integration for what each mapping is for and how markers work.

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

Until both markers exist and both mappings are configured, sync and coverage behaviour may be incomplete. If markers are missing, finish the Git integration in the product first; the agent should not infer roots from folder names alone.

Dependencies and reporter

From the directory that contains .testchimp-tests:

  • Install @testchimp/playwright (execution reporting to TestChimp, SmartTest / natural-language step execution, TrueCoverage correlation in runs).
  • Install @testchimp/cli as a dev dependency where you keep tooling, and register it in MCP config with TESTCHIMP_API_KEY.

Copy or merge the skill’s template playwright.config.js so the reporter is enabled, traces/screenshots are sensible for failures, and BASE_URL (or your convention) resolves for CI and local runs.

Optional: TrueCoverage (application instrumentation)

TrueCoverage ties real user journeys to test and automation coverage. During init, the agent checks whether the platform RUM SDK is already wired (web: @testchimp/rum-js; iOS / Android: native SDKs above) and may ask whether to enable instrumentation now, defer, or skip—persisting that choice for later /testchimp setup truecoverage flows. When enabled, init wires emit helpers, environment tags, URL schemes / intent filters on mobile as needed, and keeps plan docs under plans/events/ aligned with what you measure. Self-service steps: Instrumenting your app.

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 (browser; may call APIs for setup).
apiPrimarily API tests.

Seed endpoints — Prefer idempotent backend endpoints for creating and resetting test data; if they do not exist yet, init plans creating them with clear non-production guards. Fixtures call those endpoints from test.extend setup/teardown so tests share a stable posture. See Test flow for how that connects to /testchimp test.

Environments: persistent vs ephemeral

Init records an environment strategy in plans/knowledge/ai-test-instructions.md (for example default persistent staging vs ephemeral full stack, Bunnyshell / EaaS vs branch preview URLs, how CI sets BASE_URL). When you use Bunnyshell, configure it under Project settings → Integrations—see Bunnyshell integration. That file is what later /testchimp test and /testchimp evolve runs reuse so decisions stay consistent.

CI

Configure CI to run Playwright from the tests root (the path with .testchimp-tests) with TESTCHIMP_API_KEY set. Use a preview or deployed URL as BASE_URL when running against a branch build. Exclude plan-only sync PRs from “must pass automation” rules if your team uses titles such as TestChimp Platform Sync [Plans].

End state

After init, you should have: Git + two mappings, markers, reporter + MCP, Playwright projects wired in order, seed strategy (or explicit follow-ups), documented environment strategy, optional TrueCoverage path, and a skill marker so the agent knows init completed.

Next: when implementation for a PR is ready, use /testchimp test. For ongoing gap closure, use /testchimp evolve.