# Test Architect workflow: automate name: testarch-automate description: "Expand test automation coverage after implementation or analyze existing codebase to generate comprehensive test suite" author: "BMad" # Critical variables from config config_source: "{project-root}/bmad/bmm/config.yaml" output_folder: "{config_source}:output_folder" user_name: "{config_source}:user_name" communication_language: "{config_source}:communication_language" date: system-generated # Workflow components installed_path: "{project-root}/bmad/bmm/workflows/testarch/automate" instructions: "{installed_path}/instructions.md" validation: "{installed_path}/checklist.md" template: false # Variables and inputs variables: # Execution mode standalone_mode: true # Can work without BMad artifacts (true) or integrate with BMad (false) # Target specification (flexible - can be story, feature, or directory) story_file: "" # Path to story markdown (optional - only if BMad workflow) target_feature: "" # Feature name or directory to analyze (e.g., "user-authentication" or "src/auth/") target_files: "" # Specific files to analyze (comma-separated paths) # Discovery and analysis test_dir: "{project-root}/tests" source_dir: "{project-root}/src" auto_discover_features: true # Automatically find features needing tests analyze_coverage: true # Check existing test coverage gaps # Coverage strategy coverage_target: "critical-paths" # critical-paths, comprehensive, selective test_levels: "e2e,api,component,unit" # Which levels to generate (comma-separated) avoid_duplicate_coverage: true # Don't test same behavior at multiple levels # Test priorities (from test-priorities.md knowledge fragment) include_p0: true # Critical paths (every commit) include_p1: true # High priority (PR to main) include_p2: true # Medium priority (nightly) include_p3: false # Low priority (on-demand) # Test design principles use_given_when_then: true # BDD-style test structure one_assertion_per_test: true # Atomic test design network_first: true # Route interception before navigation deterministic_waits: true # No hard waits or sleeps # Infrastructure generation generate_fixtures: true # Create/enhance fixture architecture generate_factories: true # Create/enhance data factories update_helpers: true # Add utility functions # Integration with BMad artifacts (when available) use_test_design: true # Load test-design.md if exists use_tech_spec: true # Load tech-spec.md if exists use_prd: true # Load PRD.md if exists # Output configuration update_readme: true # Update test README with new specs update_package_scripts: true # Add test execution scripts output_summary: "{output_folder}/automation-summary.md" # Quality gates max_test_duration: 90 # seconds (1.5 minutes per test) max_file_lines: 300 # lines (keep tests lean) require_self_cleaning: true # All tests must clean up data # Advanced options auto_load_knowledge: true # Load test-levels, test-priorities, fixture-architecture, selective-testing, ci-burn-in run_tests_after_generation: true # Verify tests pass/fail as expected # Output configuration default_output_file: "{output_folder}/automation-summary.md" # Required tools required_tools: - read_file # Read source code, existing tests, BMad artifacts - write_file # Create test files, fixtures, factories, summaries - create_directory # Create test directories - list_files # Discover features and existing tests - search_repo # Find coverage gaps and patterns - glob # Find test files and source files # Recommended inputs (optional - depends on mode) recommended_inputs: - story: "Story markdown with acceptance criteria (optional - BMad mode only)" - tech_spec: "Technical specification (optional - BMad mode only)" - test_design: "Test design document with risk/priority (optional - BMad mode only)" - source_code: "Feature implementation to analyze (required for standalone mode)" - existing_tests: "Current test suite for gap analysis (always helpful)" - framework_config: "Test framework configuration (playwright.config.ts, cypress.config.ts)" tags: - qa - automation - test-architect - regression - coverage execution_hints: interactive: false # Minimize prompts autonomous: true # Proceed without user input unless blocked iterative: true web_bundle: false