/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,
initplans 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 withmergeTests) 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/testchimpor.cursor/skills/testchimpin the repo) soSKILL.mdis loaded and.gitallowsgit pullupdates. - 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.
- In TestChimp → your project → Project Settings → Integrations → Git, connect the repo.
- Map one folder to plans and one folder to tests.
- From TestChimp, sync so the scaffold and marker files land in git:
.testchimp-plansat the plans root.testchimp-testsat 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/clias a dev dependency where you keep tooling, and register it in MCP config withTESTCHIMP_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:
| Project | Role |
|---|---|
setup | Runs first; global seed / teardown and shared fixtures. |
e2e | Primarily UI SmartTests (browser; may call APIs for setup). |
api | Primarily 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.