剧作家MCP橙色演示
具有多种执行策略的自动化测试框架:从IA的探索性测试到优化的回归测试。
🎯 这是什么?
一个框架,允许您根据需要以不同的方式运行测试:
- 🤖 AI 代理:在不编写代码的情况下从自然语言运行测试
- 🥒 黄瓜:使用0个令牌消费的可重复使用的BDD测试
- ⚡ 剧作家:高性能综合测试
- 📝 手册:控制总输入
🚀 快速启动
# Explorar con IA (sin código)
npm run ai:test "Ve a orange.es y valida que aparece el logo"
# Ejecutar tests Cucumber (recomendado)
npm run test:cucumber
# Ejecutar tests Playwright consolidados
npm run test:smoke______________________________________________________________________
⚙️ 安装
# Clonar repositorio
git clone https://github.com/gmartcas/playwright-mcp-orange-demo.git
cd playwright-mcp-orange-demo
# Instalar dependencias
npm install
# Instalar navegadores
npx playwright install配置环境变量
创建新文件 .env 在根上:
ANTHROPIC_API_KEY=tu_api_key_aqui______________________________________________________________________
📁 项目结构
playwright-mcp-orange-demo/
├── features/ # Tests Cucumber (.feature + step definitions)
├── tests/ # Tests organizados por tipo
│ ├── playwright/ # Tests Playwright consolidados (versionados)
│ │ ├── smoke/ # Tests críticos < 5 min
│ │ ├── e2e/ # Tests E2E < 30 min
│ │ └── integration/ # Tests integración < 15 min
│ ├── exploratory/ # Tests exploratorios (no versionar)
│ └── requests/ # Instrucciones para AI Agent
├── src/ # Código fuente (Clean Architecture)
│ ├── domain/ # Entidades y lógica de negocio
│ ├── application/ # Casos de uso
│ ├── infrastructure/ # Adaptadores externos
│ └── interface/ # CLI y controladores
└── docs/ # Documentación organizada
├── architecture/ # Diseño técnico y diagramas
├── guides/ # Guías prácticas de usuario
└── technical/ # Documentación técnica detallada______________________________________________________________________
🎯 主要脚本
日常发展
# Exploración con Cucumber (0 tokens)
npm run test:explore
npm run test:explore:headed # Con navegador visible
npm run test:explore:watch # Modo watch人工智能发电
# Generar solo .feature desde lenguaje natural
npm run generate:feature "descripción del test" @smoke
# Generar .feature + .spec.ts completo (⭐ Recomendado)
npm run generate:full "descripción del test" smoke @smoke黄瓜测试(Estrategia校长)
npm run test:cucumber # Todos los tests
npm run test:cucumber:smoke # Solo @smoke
npm run test:cucumber:e2e # Solo @e2e
npm run test:cucumber:integration # Solo @integration
npm run test:cucumber:xray # Con reporte para XrayPlaywright 综合测试
npm run test:smoke # Tests críticos
npm run test:e2e # Tests E2E completos
npm run test:integration # Tests de integración
npm run test:suite # Todos los suites人工智能代理(快速扫描)
npm run ai:test "instrucción en lenguaje natural"
npm run ai:file tests/requests/mi-instruccion.txt
npm run ai:batch tests/requests/巩固(功能→规格)
npm run consolidate features/regression/login.feature
npm run consolidate:to-suite features/regression/login.feature smoke公用事业
npm run report # Ver último reporte HTML
npm run lint # Linter______________________________________________________________________
📚 完整的文件
🏗️ 建筑
📘 用户指南
🔧 技术文件
- Estrategia黄瓜第一 -建议的方法
- 策略比较 -详细分析
- AI 代理 -人工智能执行
- 报告 -高级配置
- 结构 -项目组织
👉 查看完整索引
______________________________________________________________________
🔧 配置
剧作家(playwright.config.ts)
- 按测试类型划分的超时
- HTML和JSON报告
- IC中的自动重试
黄瓜(cucumber.config.js)
- 标签:@smoke,@e2e,@integration
- 可重复使用的步骤定义
- 多种报告格式
______________________________________________________________________
🤝 争议
- 叉库
- 创建分支 :
git checkout -b feature/nueva-funcionalidad - 承诺:
git commit -m "feat: descripción" - 推:
git push origin feature/nueva-funcionalidad - 打开拉动请求
______________________________________________________________________
📝 许可证
麻省理工学院
______________________________________________________________________
🔗 有用的链接
______________________________________________________________________
