# ๐ญ Playwright Flow Tester
> **The Ultimate UI/UX Testing Suite with MCP Integration**
[](https://playwright.dev/)
[](https://modelcontextprotocol.io/)
[](https://python.org/)
[](https://docker.com/)
[](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)**