Agent Skillsterryso/open-agent-sdk-swift › bmad-qa-generate-e2e-tests

bmad-qa-generate-e2e-tests

GitHub

用于为已实现的功能生成自动化 API 和端到端测试的 QA 技能。自动检测项目现有测试框架,加载配置与上下文,生成符合规范的测试代码及摘要报告。

.agents/skills/bmad-qa-generate-e2e-tests/SKILL.md terryso/open-agent-sdk-swift

Trigger Scenarios

用户请求创建功能自动化测试 用户提及 'create qa automated tests'

Install

npx skills add terryso/open-agent-sdk-swift --skill bmad-qa-generate-e2e-tests -g -y
More Options

Non-standard path

npx skills add https://github.com/terryso/open-agent-sdk-swift/tree/main/.agents/skills/bmad-qa-generate-e2e-tests -g -y

Use without installing

npx skills use terryso/open-agent-sdk-swift@bmad-qa-generate-e2e-tests

指定 Agent (Claude Code)

npx skills add terryso/open-agent-sdk-swift --skill bmad-qa-generate-e2e-tests -a claude-code -g -y

安装 repo 全部 skill

npx skills add terryso/open-agent-sdk-swift --all -g -y

预览 repo 内 skill

npx skills add terryso/open-agent-sdk-swift --list

SKILL.md

Frontmatter
{
    "name": "bmad-qa-generate-e2e-tests",
    "description": "Generate end to end automated tests for existing features. Use when the user says \"create qa automated tests for [feature]\""
}

QA Generate E2E Tests Workflow

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).

Conventions

  • Bare paths (e.g. 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.

On Activation

Step 1: Resolve the Workflow Block

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:

  1. {skill-root}/customize.toml — defaults
  2. {project-root}/_bmad/custom/{skill-name}.toml — team overrides
  3. {project-root}/_bmad/custom/{skill-name}.user.toml — personal overrides

Any 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.

Step 2: Execute Prepend Steps

Execute each entry in {workflow.activation_steps_prepend} in order before proceeding.

Step 3: Load Persistent Facts

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.

Step 4: Load Config

Load config from {project-root}/_bmad/bmm/config.yaml and resolve:

  • project_name, user_name
  • communication_language, document_output_language
  • implementation_artifacts
  • date as system-generated current datetime
  • YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config {communication_language}

Step 5: Greet the User

Greet {user_name}, speaking in {communication_language}.

Step 6: Execute Append Steps

Execute each entry in {workflow.activation_steps_append} in order.

Activation is complete. Begin the workflow below.

Paths

  • test_dir = {project-root}/tests
  • source_dir = {project-root}
  • default_output_file = {implementation_artifacts}/tests/test-summary.md

Execution

Step 0: Detect Test Framework

Check project for existing test framework:

  • Look for package.json dependencies (playwright, jest, vitest, cypress, etc.)
  • Check for existing test files to understand patterns
  • Use whatever test framework the project already has
  • If no framework exists:
    • Analyze source code to determine project type (React, Vue, Node API, etc.)
    • Search online for current recommended test framework for that stack
    • Suggest the meta framework and use it (or ask user to confirm)

Step 1: Identify Features

Ask user what to test:

  • Specific feature/component name
  • Directory to scan (e.g., src/components/)
  • Or auto-discover features in the codebase

Step 2: Generate API Tests (if applicable)

For API endpoints/services, generate tests that:

  • Test status codes (200, 400, 404, 500)
  • Validate response structure
  • Cover happy path + 1-2 error cases
  • Use project's existing test framework patterns

Step 3: Generate E2E Tests (if UI exists)

For UI features, generate tests that:

  • Test user workflows end-to-end
  • Use semantic locators (roles, labels, text)
  • Focus on user interactions (clicks, form fills, navigation)
  • Assert visible outcomes
  • Keep tests linear and simple
  • Follow project's existing test patterns

Step 4: Run Tests

Execute tests to verify they pass (use project's test command).

If failures occur, fix them immediately.

Step 5: Create Summary

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

Keep It Simple

Do:

  • Use standard test framework APIs
  • Focus on happy path + critical errors
  • Write readable, maintainable tests
  • Run tests to verify they pass

Avoid:

  • Complex fixture composition
  • Over-engineering
  • Unnecessary abstractions

For Advanced Features:

If the project needs:

  • Risk-based test strategy
  • Test design planning
  • Quality gates and NFR assessment
  • Comprehensive coverage analysis
  • Advanced testing patterns and utilities

Install Test Architect (TEA) module: https://bmad-code-org.github.io/bmad-method-test-architecture-enterprise/

Output

Save summary to: {default_output_file}

Done! Tests generated and verified. Validate against ./checklist.md.

On Complete

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.

Version History

  • 0.12.0 Current 2026-07-24 22:34

Same Skill Collection

.agents/skills/bmad-advanced-elicitation/SKILL.md
.agents/skills/bmad-agent-analyst/SKILL.md
.agents/skills/bmad-agent-architect/SKILL.md
.agents/skills/bmad-agent-dev/SKILL.md
.agents/skills/bmad-agent-pm/SKILL.md
.agents/skills/bmad-agent-tech-writer/SKILL.md
.agents/skills/bmad-agent-ux-designer/SKILL.md
.agents/skills/bmad-check-implementation-readiness/SKILL.md
.agents/skills/bmad-checkpoint-preview/SKILL.md
.agents/skills/bmad-code-review/SKILL.md
.agents/skills/bmad-correct-course/SKILL.md
.agents/skills/bmad-create-architecture/SKILL.md
.agents/skills/bmad-create-epics-and-stories/SKILL.md
.agents/skills/bmad-create-prd/SKILL.md
.agents/skills/bmad-create-story/SKILL.md
.agents/skills/bmad-create-ux-design/SKILL.md
.agents/skills/bmad-customize/SKILL.md
.agents/skills/bmad-dev-story/SKILL.md
.agents/skills/bmad-distillator/SKILL.md
.agents/skills/bmad-document-project/SKILL.md
.agents/skills/bmad-domain-research/SKILL.md
.agents/skills/bmad-edit-prd/SKILL.md
.agents/skills/bmad-editorial-review-prose/SKILL.md
.agents/skills/bmad-editorial-review-structure/SKILL.md
.agents/skills/bmad-generate-project-context/SKILL.md
.agents/skills/bmad-help/SKILL.md
.agents/skills/bmad-index-docs/SKILL.md
.agents/skills/bmad-investigate/SKILL.md
.agents/skills/bmad-market-research/SKILL.md
.agents/skills/bmad-party-mode/SKILL.md
.agents/skills/bmad-prd/SKILL.md
.agents/skills/bmad-prfaq/SKILL.md
.agents/skills/bmad-product-brief/SKILL.md
.agents/skills/bmad-quick-dev/SKILL.md
.agents/skills/bmad-retrospective/SKILL.md
.agents/skills/bmad-review-adversarial-general/SKILL.md
.agents/skills/bmad-review-edge-case-hunter/SKILL.md
.agents/skills/bmad-shard-doc/SKILL.md
.agents/skills/bmad-spec/SKILL.md
.agents/skills/bmad-sprint-planning/SKILL.md
.agents/skills/bmad-sprint-status/SKILL.md
.agents/skills/bmad-story-automator-review/SKILL.md
.agents/skills/bmad-tea/SKILL.md
.agents/skills/bmad-teach-me-testing/SKILL.md
.agents/skills/bmad-technical-research/SKILL.md
.agents/skills/bmad-testarch-atdd/SKILL.md
.agents/skills/bmad-testarch-automate/SKILL.md
.agents/skills/bmad-testarch-ci/SKILL.md
.agents/skills/bmad-testarch-framework/SKILL.md

Metadata

Files
0
Version
0.12.0
Hash
ad6025f0
Indexed
2026-07-24 22:34

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 09:21
浙ICP备14020137号-1 $Гость$