# ๐ŸŽญ Playwright Flow Tester > **The Ultimate UI/UX Testing Suite with MCP Integration** [![Playwright](https://img.shields.io/badge/Playwright-2.0+-green.svg)](https://playwright.dev/) [![MCP](https://img.shields.io/badge/MCP-Protocol-blue.svg)](https://modelcontextprotocol.io/) [![Python](https://img.shields.io/badge/Python-3.11+-yellow.svg)](https://python.org/) [![Docker](https://img.shields.io/badge/Docker-Ready-orange.svg)](https://docker.com/) [![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) **Transform your testing workflow with AI-powered automation, comprehensive logging, and seamless MCP integration.** --- ## โœจ **Why Choose Playwright Flow Tester?** | Feature | Traditional Testing | Our Solution | |---------|-------------------|--------------| | **Screenshots** | Last 3 steps only | ๐ŸŽฏ **20+ configurable buffers** | | **Debug Info** | Basic logs | ๐Ÿ” **Performance metrics + Network analysis** | | **Integration** | Manual setup | ๐Ÿค– **MCP-native with Claude Code/Cursor** | | **Artifacts** | File system only | ๐Ÿ“ฆ **Streaming + Export + Caching** | | **Dependencies** | Multiple APIs | ๐Ÿšซ **Zero external dependencies** | --- ## ๐Ÿš€ **Quick Start (2 minutes)** ```bash # 1. Clone & Build git clone https://github.com/sadiuysal/flow-tester.git cd flow-tester docker build -t flow-tester-agent:latest flow_tester_agent/ # 2. Configure MCP (copy templates) cp .cursor/mcp.json.template .cursor/mcp.json cp .mcp.json.template .mcp.json cp .claude/settings.local.json.template .claude/settings.local.json # 3. Test Integration ./test-mcp.sh ``` **๐ŸŽ‰ That's it! Restart your editor and access 12 powerful MCP tools.** --- ## ๐Ÿ› ๏ธ **12 Powerful MCP Tools at Your Fingertips** ### **๐Ÿงช Core Testing** - **`execute_enhanced_ui_flow`** - Run comprehensive UI flows with 20+ screenshot buffers - **`create_flow_template`** - Generate templates for login, ecommerce, forms - **`validate_flow_definition`** - Validate flows before execution ### **๐Ÿ“Š Artifact Management** - **`get_artifacts`** - Retrieve traces, videos, screenshots with metadata - **`list_artifacts`** - Filter and paginate through artifacts - **`export_artifacts`** - Export in ZIP, JSON, HTML formats - **`stream_artifact`** - Efficient streaming for large files ### **๐Ÿ” Debug & Analysis** - **`get_execution_logs`** - Detailed step-by-step execution logs - **`get_debug_context`** - Performance metrics, element states, network data - **`get_cache_stats`** - Monitor caching performance - **`cleanup_artifacts`** - Intelligent retention policies --- ## ๐ŸŽฏ **Perfect For**
| ๐Ÿ‘จโ€๏ฟฝ๏ฟฝ **Developers** | ๐Ÿงช **QA Engineers** | ๐Ÿš€ **DevOps Teams** | ๐Ÿค– **AI Enthusiasts** | |---------------------|---------------------|---------------------|----------------------| | Automated testing in CI/CD | Complex user flow validation | Infrastructure testing | MCP integration | | Performance monitoring | Visual regression testing | Cross-browser testing | AI-powered workflows | | Debug information | Artifact management | Scalable testing | Claude Code integration |
--- ## ๐Ÿ”ฅ **Key Features That Set Us Apart** ### **๐Ÿ“ธ Enhanced Screenshot Buffers** ```typescript // Traditional: Only last 3 screenshots // Our Solution: Configurable 20+ screenshots with metadata const { snap } = withScreenRing(25); // Customize buffer size await snap(page, 'user-login-attempt'); await snap(page, 'form-validation-error'); await snap(page, 'success-state'); // ... 22 more screenshots available! ``` ### **๐Ÿ“Š Comprehensive Debug Context** - **Performance Metrics**: Core Web Vitals, load times, memory usage - **Element States**: Visibility, attributes, dimensions, position tracking - **Network Analysis**: Request/response patterns, error detection - **Memory Monitoring**: Usage patterns and optimization insights ### **๐Ÿค– MCP-Native Integration** - **Zero Setup**: Works immediately with Claude Code, Cursor, VS Code - **Real-time Access**: Direct artifact access without file system mounting - **Streaming Support**: Efficient handling of large artifacts - **Intelligent Caching**: Configurable retention and compression --- ## ๐Ÿ—๏ธ **Architecture Overview** ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ MCP Client (Claude/Cursor) โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Playwright Flow Tester Agent โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Enhanced โ”‚ โ”‚ Artifact โ”‚ โ”‚ MCP โ”‚ โ”‚ โ”‚ โ”‚ Logging โ”‚ โ”‚ Manager โ”‚ โ”‚ Server โ”‚ โ”‚ โ”‚ โ”‚ (20+ buffers) โ”‚ โ”‚ (Streaming) โ”‚ โ”‚ (12 tools) โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Playwright Engine โ”‚ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ โ”‚ โ”‚ Chromium โ”‚ โ”‚ Firefox โ”‚ โ”‚ WebKit โ”‚ โ”‚ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` --- ## ๐Ÿ“š **Documentation & Resources** | Resource | Description | Link | |----------|-------------|------| | **๐Ÿš€ Quick Start** | Get running in 2 minutes | [SETUP.md](./SETUP.md) | | **๐Ÿ“– Usage Guide** | Comprehensive API reference | [USAGE.md](./USAGE.md) | | **๐Ÿ”’ Security Audit** | Complete security analysis | [SECURITY_AUDIT.md](./SECURITY_AUDIT.md) | | **๐Ÿ‘จโ€๐Ÿ’ป Development** | Contributing guidelines | [CLAUDE.md](./CLAUDE.md) | --- ## ๐ŸŒŸ **Real-World Use Cases** ### **E-commerce Testing** ```typescript // Test complete purchase flow with enhanced logging await execute_enhanced_ui_flow({ name: "purchase-flow", actions: [ { type: "navigate", url: "/products" }, { type: "click", selector: "[data-testid='add-to-cart']" }, { type: "navigate", url: "/checkout" }, { type: "fill", selector: "#email", value: "test@example.com" }, { type: "click", selector: "[data-testid='complete-purchase']" } ], enhanced_logging: { screenshot_buffer_size: 25 } }); ``` ### **Form Validation Testing** ```typescript // Comprehensive form testing with debug context await execute_enhanced_ui_flow({ name: "registration-form", actions: [ { type: "navigate", url: "/register" }, { type: "fill", selector: "#username", value: "testuser" }, { type: "fill", selector: "#email", value: "invalid-email" }, { type: "click", selector: "#submit" } ], enhanced_logging: { collect_performance_metrics: true, collect_element_states: true } }); ``` --- ## ๐Ÿš€ **Performance & Scalability** - **โšก Fast Execution**: Optimized Playwright workflows - **๐Ÿ”„ Parallel Testing**: Support for multiple concurrent flows - **๐Ÿ’พ Smart Caching**: Configurable artifact retention - **๐ŸŒ Cross-Platform**: Works on Windows, macOS, Linux - **๐Ÿณ Docker Ready**: Consistent environment across deployments --- ## ๏ฟฝ๏ฟฝ **Community & Support** - **๐Ÿ“– Comprehensive Docs**: Setup guides, examples, troubleshooting - **๐Ÿ”ง Active Development**: Regular updates and improvements - **๐Ÿ› Issue Tracking**: GitHub issues for bug reports and feature requests - **๐Ÿ’ก Examples**: Real-world use cases and templates - **๐Ÿ”’ Security Focus**: Regular security audits and updates --- ## ๐Ÿ“Š **Project Stats & Metrics**
| Metric | Value | Status | |--------|-------|--------| | **MCP Tools** | 12 | โœ… Complete | | **Screenshot Buffers** | 20+ | โœ… Configurable | | **Browser Support** | 3 | โœ… Chromium, Firefox, WebKit | | **Artifact Formats** | 4 | โœ… ZIP, JSON, HTML, Streaming | | **Dependencies** | 0 | โœ… Zero external APIs |
--- ## ๐ŸŽฏ **Getting Started Today** 1. **๐Ÿš€ [Quick Start Guide](./SETUP.md)** - Get running in 2 minutes 2. **๐Ÿ“– [Usage Examples](./USAGE.md)** - Learn the API 3. **๐Ÿ”ง [Configuration](./SETUP.md#mcp-configuration-setup)** - Set up MCP integration 4. **๐Ÿงช [Test Examples](./examples/)** - See real-world usage --- ## ๏ฟฝ๏ฟฝ **Star This Repository** If Playwright Flow Tester helps you build better software, please give us a โญ star! It helps with visibility and motivates us to keep improving. --- ## ๐Ÿ“„ **License** MIT License - see [LICENSE](LICENSE) file for details. --- ## ๐Ÿ™ **Acknowledgments** - **[Playwright](https://playwright.dev/)** - The amazing browser automation framework - **[Model Context Protocol](https://modelcontextprotocol.io/)** - Seamless AI integration - **[FastMCP](https://github.com/modelcontextprotocol/python-sdk)** - Python MCP server framework - **Community Contributors** - Your feedback and contributions ---
**๐ŸŽญ Built with โค๏ธ for developers who demand excellence in testing** **[Get Started Now โ†’](./SETUP.md)**