mirror of
https://github.com/bmadcode/BMAD-METHOD.git
synced 2025-12-29 16:14:59 +00:00
reafactor: test arch audit (#758)
Co-authored-by: Murat Ozcan <murat@mac.lan>
This commit is contained in:
@@ -18,54 +18,9 @@ template: "{installed_path}/test-review-template.md"
|
||||
|
||||
# Variables and inputs
|
||||
variables:
|
||||
# Review target
|
||||
test_file_path: "" # Explicit test file to review (if not provided, auto-discover)
|
||||
test_dir: "{project-root}/tests"
|
||||
test_dir: "{project-root}/tests" # Root test directory
|
||||
review_scope: "single" # single (one file), directory (folder), suite (all tests)
|
||||
|
||||
# Review configuration
|
||||
quality_score_enabled: true # Calculate 0-100 quality score
|
||||
append_to_file: false # true = inline comments, false = separate report
|
||||
check_against_knowledge: true # Use tea-index.csv fragments for validation
|
||||
strict_mode: false # Strict = fail on any violation, Relaxed = advisory only
|
||||
|
||||
# Quality criteria to check
|
||||
check_given_when_then: true # BDD format validation
|
||||
check_test_ids: true # Test ID conventions (e.g., 1.3-E2E-001)
|
||||
check_priority_markers: true # P0/P1/P2/P3 classification
|
||||
check_hard_waits: true # Detect sleep(), wait(X), hardcoded delays
|
||||
check_determinism: true # No conditionals (if/else), no try/catch abuse
|
||||
check_isolation: true # Tests clean up, no shared state
|
||||
check_fixture_patterns: true # Pure function → Fixture → mergeTests
|
||||
check_data_factories: true # Factory usage vs hardcoded data
|
||||
check_network_first: true # Route intercept before navigate
|
||||
check_assertions: true # Explicit assertions, not implicit waits
|
||||
check_test_length: true # Warn if >300 lines per file
|
||||
check_test_duration: true # Warn if individual test >1.5 min
|
||||
check_flakiness_patterns: true # Common flaky patterns (race conditions, timing)
|
||||
|
||||
# Integration with BMad artifacts
|
||||
use_story_file: true # Load story for context (acceptance criteria)
|
||||
use_test_design: true # Load test-design for priority context
|
||||
auto_discover_story: true # Find related story by test ID
|
||||
|
||||
# Output configuration
|
||||
output_file: "{output_folder}/test-review-{filename}.md"
|
||||
generate_inline_comments: false # Add TODO comments in test files
|
||||
generate_quality_badge: true # Create quality badge/score
|
||||
append_to_story: false # Add review section to story file
|
||||
|
||||
# Knowledge base fragments to load
|
||||
knowledge_fragments:
|
||||
- test-quality.md # Definition of Done for tests
|
||||
- fixture-architecture.md # Pure function → Fixture patterns
|
||||
- network-first.md # Route interception before navigation
|
||||
- data-factories.md # Factory patterns and best practices
|
||||
- test-levels-framework.md # E2E vs API vs Component vs Unit
|
||||
- playwright-config.md # Configuration patterns (if Playwright)
|
||||
- tdd-cycles.md # Red-Green-Refactor patterns
|
||||
- selective-testing.md # Duplicate coverage detection
|
||||
|
||||
# Output configuration
|
||||
default_output_file: "{output_folder}/test-review.md"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user