Appropriate use
Use for Playwright, Cypress, API, unit, integration, or mixed automation suites before expansion, migration, or reliability work.
Audits an automated test suite for correctness, reliability, isolation, maintainability, coverage value, security, runtime cost, and false-confidence patterns.
This page defines the behaviour, controls, evidence, and outputs required from the skill. It does not claim that a language model can enforce security or correctness by wording alone.
Use for Playwright, Cypress, API, unit, integration, or mixed automation suites before expansion, migration, or reliability work.
Do not use to judge tests only by pass rate, delete tests automatically, weaken assertions, or modify the repository without explicit approval.
Each phase has explicit inputs and outputs. Approval gates are hard stops bound to exact versions and hashes.
Resolve repository, branch, commit, test framework, configuration, CI workflow, target environments, ownership, and review scope. Ensure the working tree and write permissions are controlled.
Map tests, tags, fixtures, helpers, selectors, assertions, retries, timeouts, mocks, data sources, cleanup, and suite dependencies.
Detect weak or missing assertions, arbitrary waits, retry masking, brittle selectors, over-mocking, hidden dependencies, broad catches, ignored errors, and tests that cannot fail meaningfully.
Map tests to risks and product behaviour, identify duplicates, gaps, inappropriate test layers, dead tests, and expensive low-value paths.
Run approved suites or samples with retries exposed, order randomisation, concurrency variation, trace capture, and resource monitoring where safe.
Reproduce suspected test flaws, distinguish product failures from automation failures, and avoid labelling a test flaky from one failed run.
Prioritise fixes, merges, deletions, layer moves, data isolation, selector changes, fixture redesign, and CI improvements. Show expected benefit and migration risk.
Publish the audit, machine-readable findings, and approved patch set. Any code change remains reviewable and is validated against the original failure mode.
An approval cannot be reused after its environment, source, action plan, or approved document changes.
| Gate | Decision | Required binding |
|---|---|---|
| 1 | Gate 1 · approve audit scope | Approval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state. |
| 2 | Gate 2 · approve execution | Approval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state. |
| 3 | Gate 3 · approve recommendations | Approval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state. |
| 4 | Gate 4 · publish | Approval stores approver, role, timestamp, context hash, approved document hash, expiry, and invalidation state. |
Attempt outcomes remain separate from these workflow results. Errors, cancellations, and invalid context are never silently converted into a pass.
The test provides reliable, meaningful coverage with appropriate cost and maintainability.
The test has material quality debt but still provides useful signal.
Controlled evidence demonstrates inconsistent automation behaviour independent of product variation.
The test can pass without proving the intended product behaviour.
Coverage is redundant or its cost materially exceeds its distinct risk value.
The test cannot be evaluated because required environment, ownership, or execution evidence is unavailable.
Evidence has provenance, capture context, privacy classification, retention, and integrity metadata. A convenient artifact is not automatically sufficient proof.
| Claim | Primary evidence | Required validation |
|---|---|---|
| Test identity | Repository commit and test ID | The reviewed source is immutable for the audit. |
| Assertion quality | Code excerpt and behaviour trace | The assertion directly proves the intended result. |
| Flakiness | Multi-attempt controlled runs | Product, environment, order, and runner variation are separated. |
| Isolation | Resource and fixture map | Tests do not depend on shared mutable state without control. |
| Coverage value | Risk traceability | The test protects a distinct behaviour or defect class. |
| Runtime cost | CI timing and resource samples | Cost is measured across representative runs. |
These controls belong in the runtime, connector permissions, sandbox, renderer, storage layer, and review process.
Audit cannot modify tests, config, snapshots, or dependencies without approval.
Frequently passing tests can still provide false confidence.
Configured retries are reported and first-attempt outcomes remain visible.
Recommended fixes preserve or improve behavioural proof.
Commands, package installs, and scripts are allowlisted and sandboxed.
Generated changes require code review and validation before merge.
The first applicable high-severity outcome takes precedence. A manual override is recorded separately and never rewrites the calculated result.
Repository identity or execution evidence is unreliable.
False-confidence or security-sensitive tests undermine release decisions.
Material reliability or isolation issues need planned work.
Useful coverage remains with owned improvement work.
The reviewed scope provides reliable and maintainable signal.
The workflow documents what it cannot prove and what further evidence would change confidence.
Human summaries are generated from validated structured records. They are not maintained as separate, drifting sources of truth.
audit-context.jsonVersioned output produced by the workflow.
test-inventory.jsonVersioned output produced by the workflow.
rule-findings.jsonlVersioned output produced by the workflow.
coverage-map.yamlVersioned output produced by the workflow.
execution-samples/Versioned output produced by the workflow.
flaky-analysis.mdVersioned output produced by the workflow.
remediation-plan.mdVersioned output produced by the workflow.
patches/Versioned output produced by the workflow.
automation-audit.htmlVersioned output produced by the workflow.
artifacts/qa/automation-review/<run-id>/ ├── audit-context.json ├── test-inventory.json ├── rule-findings.jsonl ├── coverage-map.yaml ├── execution-samples/ ├── flaky-analysis.md ├── remediation-plan.md ├── patches/ └── automation-audit.html
Audit our Playwright regression suite for arbitrary waits, weak assertions, shared data, retries, duplicate coverage, and tests that pass without checking the UI result.
Automation audit: CRITICAL REMEDIATION Critical finding: 14 tests call the API, wait for a fixed timeout, and pass without asserting that the expected UI state appears. Other findings: - 23 arbitrary waits - 8 tests share one organisation - 6 selectors depend on generated CSS classes - CI retries hide first-attempt failures in 11 tests Recommendation: Fix false-confidence tests first, then isolate data and remove fixed waits.
The written skill is only one layer. The repository, runtime, connectors, evidence storage, and publication path must implement these requirements.
Audits an automated test suite for correctness, reliability, isolation, maintainability, coverage value, security, runtime cost, and false-confidence patterns.