What problem does it solve?
Running integration tests against an Open Mercato app requires a correctly provisioned app server, database, seeding, and readiness checks; doing this by hand risks hitting the developer's dev database or misconfiguring the environment. This Skill defines the repo-specific rules for booting, reusing, and tearing down an isolated ephemeral test environment through the mercato CLI.
Core Features & Use Cases
- Ephemeral environment boot: Wraps
yarn test:integration:ephemeral:start to provision an isolated app plus testcontainers-managed Postgres, with port and database URL recorded in .ai/qa/ephemeral-env.json.
- Managed and reuse run modes: Supports fully managed per-run provisioning or boot-once-and-reuse for fast filtered test iteration, gated by the CLI's TTL and freshness checks.
- Readiness probe contract: Defines shell (
GET /login) and authenticated form-encoded login probes, plus seeded credentials, so agents verify the environment correctly.
- Safe teardown: Stops CLI owner processes, clears state files and server locks, and leaves testcontainers cleanup to ryuk.
- Use Case: An AI agent asked to run integration tests boots the ephemeral env with one CLI command, waits for the readiness marker, runs filtered Playwright specs, and tears everything down without touching dev data.
Quick Start
Ask the agent to prepare the test environment by running yarn test:integration:ephemeral:start and confirm readiness via the login probe before executing integration tests.