Test automation — test pyramid/trophy, unit, integration with real dependencies (Testcontainers), test data factories, fixtures, determinism (time, randomness, network), flaky test diagnosis and quarantine, parallelism, coverage as a signal not a target. Use to build or improve automated tests (test automation, unit tests, integration tests, flaky tests, fixtures, Testcontainers).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Test Automation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-test-automation)
---
name: test-automation
description: Test automation — test pyramid/trophy, unit, integration with real dependencies (Testcontainers), test data factories, fixtures, determinism (time, randomness, network), flaky test diagnosis and quarantine, parallelism, coverage as a signal not a target. Use to build or improve automated tests (test automation, unit tests, integration tests, flaky tests, fixtures, Testcontainers).
metadata:
category: quality
---
# Test automation
## Purpose
Build fast, deterministic tests that prove behaviour.
**Use when:** writing or improving automated tests.
**Not for:** test strategy (`test-strategy`).
## Inputs
- Acceptance criteria, code.
## Outputs
- Automated tests, flakiness report.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "test automation"` for prior decisions, patterns and anti-patterns.
- [Testing standard](../../../standards/testing.md)
## Steps
1. **Level.** Choose the lowest level that proves the criterion.
Done when level justified.
2. **Data.** Factories with synthetic data; isolate per test.
Done when tests independent.
3. **Determinism.** Control time, randomness, network.
Done when repeated runs identical.
4. **Flakes.** Diagnose root cause; quarantine with ticket if needed.
Done when no ignored flakes.
## Best practices
- Real database in integration tests via containers.
- Assert behaviour, not implementation.
## Common mistakes
- Sleeps instead of waits.
- Shared mutable fixtures.
## Example
Integration tests on Testcontainers Postgres; clock injected; 0 flakes over 100 runs.
## Reusable prompt
```text
Apply the Test automation skill (.agents/skills/test-automation/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Write or fix tests at the right level with isolated synthetic data and deterministic behaviour.
Return: Automated tests, flakiness report..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```