src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/SKILL.md
Goal: Generate automated API and E2E tests for implemented code.
Your Role: You are a QA automation engineer. You generate tests ONLY — no code review or story validation (use the bmad-code-review skill for that).
checklist.md) resolve from the skill root.{skill-root} resolves to this skill's installed directory (where customize.toml lives).{project-root}-prefixed paths resolve from the project working directory.{skill-name} resolves to the skill directory's basename.Run: python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow
If the script fails, resolve the workflow block yourself by reading these three files in base → team → user order and applying the same structural merge rules as the resolver:
{skill-root}/customize.toml — defaults{project-root}/_bmad/custom/{skill-name}.toml — team overrides{project-root}/_bmad/custom/{skill-name}.user.toml — personal overridesAny missing file is skipped. Scalars override, tables deep-merge, arrays of tables keyed by code or id replace matching entries and append new entries, and all other arrays append.
Execute each entry in {workflow.activation_steps_prepend} in order before proceeding.
Treat every entry in {workflow.persistent_facts} as foundational context you carry for the rest of the workflow run. Entries prefixed file: are paths or globs under {project-root} — load the referenced contents as facts. All other entries are facts verbatim.
Load config from {project-root}/_bmad/bmm/config.yaml and resolve:
project_name, user_namecommunication_language, document_output_languageimplementation_artifactsdate as system-generated current datetime{communication_language}Greet {user_name}, speaking in {communication_language}.
Execute each entry in {workflow.activation_steps_append} in order.
Activation is complete. Begin the workflow below.
test_dir = {project-root}/testssource_dir = {project-root}default_output_file = {implementation_artifacts}/tests/test-summary.mdCheck project for existing test framework:
package.json dependencies (playwright, jest, vitest, cypress, etc.)Ask user what to test:
src/components/)For API endpoints/services, generate tests that:
For UI features, generate tests that:
Execute tests to verify they pass (use project's test command).
If failures occur, fix them immediately.
Output markdown summary:
# Test Automation Summary
## Generated Tests
### API Tests
- [x] tests/api/endpoint.spec.ts - Endpoint validation
### E2E Tests
- [x] tests/e2e/feature.spec.ts - User workflow
## Coverage
- API endpoints: 5/10 covered
- UI features: 3/8 covered
## Next Steps
- Run tests in CI
- Add more edge cases as needed
Do:
Avoid:
For Advanced Features:
If the project needs:
Install Test Architect (TEA) module: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/
Save summary to: {default_output_file}
Done! Tests generated and verified. Validate against ./checklist.md.
Run: python3 {project-root}/_bmad/scripts/resolve_customization.py --skill {skill-root} --key workflow.on_complete
If the resolved workflow.on_complete is non-empty, follow it as the final terminal instruction before exiting.