bmad-testarch-automate

Generates prioritized E2E, API, component, and unit tests with fixtures and factories for a codebase.

1|Updated Sep 18, 2026
One-click install
npx skills add https://github.com/PastaSus/egg-defender --skill bmad-testarch-automate-pastasus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bmad-testarch-automate
Source: https://github.com/PastaSus/egg-defender/tree/main/.agents/skills/bmad-testarch-automate
Command: npx skills add https://github.com/PastaSus/egg-defender --skill bmad-testarch-automate-pastasus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Expanding test automation coverage across a codebase is slow and inconsistent when done manually, often producing flaky tests, duplicated coverage, and hardcoded data. This Skill analyzes your codebase or BMad artifacts and generates a structured, prioritized test suite with supporting fixtures, factories, and documentation. ## Core Features & Use Cases - Multi-Level Test Generation: Creates E2E, API, component, and unit tests with P0-P3 priority tags, avoiding duplicate coverage across levels. - Test Infrastructure: Generates fixtures with auto-cleanup, faker-based data factories, and helper utilities, plus optional Playwright Utils and Pact.js contract test support. - Validation and Healing: Optionally runs generated tests, heals failures (selector, timing, data issues), and marks unfixable tests with test.fixme() and detailed comments. - Use Case: Point it at a feature like src/orders/refunds/ and receive a complete test suite with an automation summary, coverage breakdown, and package.json test scripts. ## Quick Start Ask the AI to expand test coverage for your project or a specific feature directory and let the workflow generate the tests.

Frequently Asked Questions about bmad-testarch-automate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expand test coverage for an existing codebase?

Run the automate workflow in standalone mode by specifying a target feature or files, or let auto-discover scan the source directory. It analyzes coverage gaps, selects appropriate test levels, and generates prioritized tests with fixtures and factories.

What test frameworks does this workflow support?

It supports Playwright and Cypress for frontend, Maestro for mobile, and backend frameworks like pytest, JUnit, Go test, xUnit, and RSpec. Framework scaffolding such as playwright.config.ts must exist before running, or the workflow halts.

Does it require BMad artifacts like stories or PRDs?

No, BMad artifacts are optional. The workflow runs in BMad-Integrated mode when stories or test-design documents exist, but falls back to Standalone mode that analyzes source code directly without halting.

Can it generate Pact contract tests for microservices?

Yes, when the pactjs-utils flag is enabled and a consumer-provider boundary exists, it generates consumer contract tests and provider verification using createProviderState and buildVerifierOptions. It performs provider source scrutiny before generating interactions.

Why does the workflow halt with a framework error?

The workflow halts when no test framework configuration like playwright.config.ts or cypress.config.ts is found, since scaffolding is a hard requirement. Run the framework workflow first to set up the test infrastructure.

How does automatic test healing work?

When auto_heal_failures is enabled, failing tests are analyzed for patterns like stale selectors, race conditions, or hard waits, then fixed and re-run up to three iterations. Unfixable tests are marked with test.fixme() and detailed comments.