feat: Add Playwright-BDD Plugin - Complete Test Generation Framework#16
Open
Akash-incuByte wants to merge 10 commits intomainfrom
Open
feat: Add Playwright-BDD Plugin - Complete Test Generation Framework#16Akash-incuByte wants to merge 10 commits intomainfrom
Akash-incuByte wants to merge 10 commits intomainfrom
Conversation
- Accept absolute paths to .feature files - Reject relative paths with clear error - Reject directory paths - Validate feature file existence - Include Gherkin syntax validation placeholder - Follow bee command orchestration pattern Implements Slice 1 (Behaviors 1-5) of Phase 1 TDD plan Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Index existing step definitions with Cucumber expression parsing - Perform LLM-based semantic matching (0-100 confidence scores) - Filter candidates below 50% confidence threshold - Order by confidence then usage frequency - Track step usage across feature files - Detect duplicate step definitions - Handle empty repos gracefully Implements Slice 3 of Phase 1 TDD plan Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Analyze existing step files to detect code patterns - Generate new step definitions matching repo conventions - Handle imports, parameter style, formatting, indentation - Support both new files and appending to existing files - Fall back to minimal template for empty repos - File naming: one file per feature (search.feature → search.steps.ts) Implements Slice 6 of Phase 1 TDD plan Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**New Agents:** - playwright-pom-matcher: UI step classification and POM semantic matching - playwright-pom-generator: Generate POM methods/classes, update step defs - playwright-locator-generator: Generate stable Playwright locators from outerHTML **Command Updates:** - Integrated Phase 2 workflow after step definition generation - POM matching with confidence scores (reuse class/method/create new) - outerHTML collection for new UI elements - Locator generation following Playwright best practices - Step definition updates (TODO → POM method calls) - File-based approval workflow consistent with Phase 1 **Pattern Learning:** - Analyzes existing POMs for structure, imports, locator style - Generates matching code following repo conventions - Falls back to minimal template for empty repos Phase 2 complete - UI test generation fully automated Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**New Agents:** - playwright-service-matcher: API step classification and service semantic matching - playwright-service-generator: Generate service methods/classes for API tests **Command Updates:** - Integrated Phase 3 workflow (parallel to Phase 2 but for API steps) - Service matching with confidence scores (reuse method/add method/create service) - Response structure collection for type-safe API parsing - Step definition updates (TODO → service method calls) - File-based approval workflow **Pattern Learning:** - Analyzes existing services for HTTP client patterns, error handling - Generates matching code following repo conventions Phase 3 complete - API test generation fully automated Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**New Agent:** - playwright-utility-generator: Detect utility opportunities, generate reusable helpers **Command Updates:** - Hybrid mode now functional: "Both" implements UI first, then API - Phase 2/3 conditionally execute based on hybrid_mode setting - Utility detection after POMs/services generated - Extract data transformations, duplicated logic, complex calculations - Developer approval for each utility extraction - File-based review workflow **Hybrid Workflow:** - UI-only: Phase 2 only - API-only: Phase 3 only - Both: Phase 2 → Phase 3 sequentially Phase 4 complete - hybrid repos and utilities fully supported Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**New Agents:** - playwright-outline-converter: Detect parameterization opportunities, convert to scenario outlines - playwright-test-executor: Detect and run test scripts from package.json **Command Updates:** - Optional scenario outline analysis (developer opt-in) - Detect scenarios with identical flow but varying data - Generate scenario outlines with Examples tables - Update step definitions to accept parameters - Show impact on other feature files - Optional test execution after generation - Detect test scripts (test:bdd, test:e2e, playwright) - Developer selects script to run - Capture and display test results (pass/fail summary) **Phase 5 Workflow:** 1. Ask if outline analysis wanted 2. Show conversion suggestions with before/after 3. Apply approved conversions 4. Ask if test execution wanted 5. Select script and run tests 6. Display results Phase 5 complete - ALL PHASES IMPLEMENTED ✅ Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Moved all 10 playwright-related agents to bee/agents/playwright/: - playwright-step-matcher.md - playwright-code-generator.md - playwright-pom-matcher.md - playwright-pom-generator.md - playwright-locator-generator.md - playwright-service-matcher.md - playwright-service-generator.md - playwright-utility-generator.md - playwright-outline-converter.md - playwright-test-executor.md Better organization: keeps playwright agents grouped together Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Updated agent count from 26 to 36 - Updated command count from 10 to 11 - Added /bee:playwright command documentation with 5-phase workflow - Documented all 10 new Playwright-BDD agents: * playwright-step-matcher: semantic step matching * playwright-code-generator: step definition generation * playwright-pom-matcher: UI step classification * playwright-pom-generator: Page Object Model generation * playwright-locator-generator: stable locator generation * playwright-service-matcher: API step classification * playwright-service-generator: service layer generation * playwright-utility-generator: utility extraction * playwright-outline-converter: scenario outline conversion * playwright-test-executor: test execution - Updated project structure to show agents/playwright/ directory - Added bee-playwright command to Cursor integration docs Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ng improvements CRITICAL FIXES: - Fix agent count in README (36 → 37 specialist agents) - Clarify phase description in playwright-bdd command (all 5 phases, not just Phase 1) - Add comprehensive agent delegation error handling with structured error messages - Fix silent file read errors in step-matcher with proper tracking and warnings - Fix parse error handling in pom-matcher to prevent duplicate POM creation HIGH PRIORITY: - Improve test execution exit code handling to distinguish failure types (test failures vs syntax errors vs environment issues) - Enhance path validation error messages with helpful suggestions and diagnostics - Add structured error responses in locator-generator for proper orchestrator handling MEDIUM PRIORITY: - Standardize error handling across all 10 Playwright agents - Document confidence threshold rationale (50% for matching, 70% for method-level) - Add error handling sections to utility-generator, service-matcher, service-generator - Add cross-file dependency checks in outline-converter - Enhance POM generator with naming conflict detection All agents now have consistent error handling with: - File read error tracking with user warnings - LLM API failure handling with retry logic and rate limiting detection - Parse error detection and comprehensive reporting - Actionable recovery steps for all error conditions - No silent failures - all catch blocks properly log and report Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete implementation of the Playwright-BDD plugin for automated test generation from Gherkin scenarios. This plugin adds intelligent test automation with semantic step matching, pattern-learning code generation, and support for UI/API/hybrid repositories.
What's New
🎯
/bee:playwrightCommandNew command that orchestrates end-to-end test generation from
.featurefiles.📦 All 5 Phases Implemented
Phase 1: Step Matching & Code Generation ✅
Phase 2: Page Object Generation (UI Tests) ✅
Phase 3: Service Layer Generation (API Tests) ✅
Phase 4: Hybrid Repo Support & Utilities ✅
Phase 5: Scenario Outlines & Test Execution ✅
Architecture
Pattern: Command + Agent Delegation
bee/commands/playwright-bdd.mdbee/agents/playwright/Agent Organization
All 10 Playwright-BDD agents are organized in a dedicated folder:
Key Features
✅ Semantic Matching - LLM-based similarity scoring
✅ Pattern Learning - Adapts to ANY repo structure
✅ Approval Workflow - Developer controls every decision
✅ Hybrid Support - UI-only, API-only, or both
✅ Stable Locators - Playwright best practices
✅ Utility Extraction - DRY principle applied
✅ Scenario Outlines - Automatic parameterization
✅ Test Execution - Run tests after generation
Usage
Documentation Updates 📚
Main README (
bee/README.md)/bee:playwrightcommand documentationagents/playwright/organizationCursor Integration README (
bee/.cursor/README.md)bee-playwrightcommand to usage tableFiles Changed
Latest Commit (Documentation)
bee/README.md- Complete plugin documentation updatebee/.cursor/README.md- Cursor integration docs updatePrevious Commits
bee/commands/playwright-bdd.md)bee/agents/playwright/docs/specs/🤖 Generated with Claude Sonnet 4.5