qa-test-environment
Test environment management: 4 skills (docker-compose-test, feature-flag-test-harness, playwright-fixture-builder, testcontainers) and 2 agents (db-snapshot-restore, test-environment-bootstrapper). Composes with parallel-isolation-checker in qa-flake-triage for shared-state diagnosis.
Install this plugin
/plugin install qa-test-environment@testland-qaPart of role bundle: qa-starter
qa-test-environment
Test environment management: containerized backing services (Testcontainers + docker-compose), per-test database snapshot/restore via Postgres template DBs, an OpenFeature-driven feature-flag matrix harness, and a Playwright fixture builder. Composes with parallel-isolation-checker in qa-flake-triage for shared-state diagnosis.
Components
| Type | Name | Description |
|---|---|---|
| Skill | docker-compose-test | Authors a compose.test.yaml for tests - declares the SUT plus its real backing services as one declarative topology, wires healthcheck-... |
| Skill | feature-flag-test-harness | Builds a test harness that runs the same suite under every relevant flag combination - picks the minimum cover (single flags + pairwise i... |
| Skill | playwright-fixture-builder | Builds reusable Playwright fixtures via test.extend - picks the right scope (test vs worker), wires the use(value) setup/teardown spl... |
| Skill | testcontainers | Brings up real backing services (databases, message brokers, browsers, anything dockerizable) as throwaway containers from inside a test... |
| Agent | db-snapshot-restore | Action-taking agent that gives integration tests a clean database between cases - captures a baseline snapshot once (template DB for Po... |
| Agent | test-environment-bootstrapper | Wires a full integration/E2E test environment from scratch for a greenfield service - spins up containers (Testcontainers or Docker Compo... |
Cross-plugin reference
| Type | Name | Lives in | Description |
|---|---|---|---|
| Agent | parallel-isolation-checker | qa-flake-triage | Read-only investigator that finds the shared state two parallel workers are stepping on (DB rows, env vars, files, ports, lockfiles, module state). Install qa-flake-triage to use it; it composes naturally with this plugin's db-snapshot-restore and Playwright fixtures. |
Install
/plugin marketplace add testland/qa
/plugin install qa-test-environment@testland-qaSkills
docker-compose-test
Authors a `compose.test.yaml` for tests - declares the SUT plus its real backing services as one declarative topology, wires healthcheck-driven `depends_on: condition: service_healthy` start ordering, isolates parallel CI jobs via per-job `--project-name`, gates the test step on `--wait` / `--wait-timeout` / `--exit-code-from`, and tears the stack down deterministically with `down --volumes --remove-orphans`. Use when the test environment is multi-service (app + db + cache + queue) and the topology is best expressed in YAML rather than imperative test code.
feature-flag-test-harness
Builds a test harness that runs the same suite under every relevant flag combination - picks the minimum cover (single flags + pairwise interactions where the team marks them, not the full 2^N cartesian product), wires an OpenFeature in-memory provider so the suite never hits the production flag service, runs each combination as its own labeled CI matrix shard, and emits a per-combination result matrix. Use when a feature behind a flag must be verified on AND off (release toggles + experiment toggles per Hodgson) and the team wants those runs deterministic and parallel.
playwright-fixture-builder
Builds reusable Playwright fixtures via `test.extend` - picks the right scope (test vs worker), wires the `use(value)` setup/teardown split, composes auth (storageState per worker), database (per-test snapshot/restore), and feature-flag fixtures into one custom `test` object the whole suite imports. Outputs the `fixtures.ts` file plus per-fixture review notes (scope rationale, teardown ordering, `workerInfo.workerIndex` for parallel isolation). Use when the suite has copy-pasted `beforeEach` boilerplate that should be a fixture, or when adding auth / db / flag setup that crosses many specs.
testcontainers
Brings up real backing services (databases, message brokers, browsers, anything dockerizable) as throwaway containers from inside a test process - Java, Node.js, Python, Go, .NET, Ruby and ten other languages - using the Testcontainers library family. Wires the per-test container lifecycle, exposed-port → host-port mapping, wait strategies (port / log / HTTP / SQL), Ryuk-based cleanup, container-to-container networks, and the (experimental) `withReuse` shortcut for local dev. Use when integration tests need a real Postgres / Redis / Kafka / Selenium / etc. and the team wants per-test isolation without hand-rolled docker-compose teardown.
Agents
db-snapshot-restore
Action-taking agent that gives integration tests a clean database between cases - captures a baseline `snapshot` once (template DB for Postgres, mysqldump for MySQL, JSON dump for Mongo), then `restore`s the test DB from that baseline before each test (or each suite), tearing down all open sessions first so the rebuild succeeds. Also wires the per-test `BEGIN ... ROLLBACK` shortcut when the ORM cooperates and the schema doesn't change. Use when integration tests share a database and the team needs per-test isolation faster than `db drop && db migrate`.
test-environment-bootstrapper
Wires a full integration/E2E test environment from scratch for a greenfield service - spins up containers (Testcontainers or Docker Compose), runs schema migrations, seeds a baseline DB snapshot, installs an OpenFeature in-memory provider for all feature flags, and emits a composed Playwright fixtures file (auth + db + flags) ready for the harness. Use when a service has no test environment and the team needs the infrastructure layer (containers, DB state, flags, fixtures) before writing the first spec. Complementary to automation-harness-bootstrapper (framework skeleton) - that agent defers environment setup here.