convez.ai
MCP ServerAutomaçãoAvançado
AlexandrAQA

Jira-Playwright AI Agent

AlexandrAQA/jira-playwright-ai-agent

Converte tickets Jira em testes E2E verdes automaticamente

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server que transforma tickets Jira em testes Playwright E2E automatizados. O agente lê um ticket, explora a aplicação web com um navegador real, gera e executa testes, corrige até ficarem verdes e escreve o resultado de volta no Jira. Ideal para automação de QA sem intervenção manual.

Instalação

$npx convez-ai AlexandrAQA/jira-playwright-ai-agent

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
1
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 2 meses
Versão
—
Issues abertas
10
Contribuidores
1

Casos de uso

  • Automação de testes E2E a partir de requisitos em Jira
  • Redução de trabalho manual de QA
  • CI/CD com geração automática de testes de aceitação

Veredito

Solução inovadora que aproveita bem o MCP do Playwright e a capacidade de código do Claude para fechar um loop completo: Jira → teste → resultado. Requer setup robusto (credenciais Jira, ambiente Playwright) e funciona melhor em projetos com fluxo de tickets bem estruturado.

README

A tradução para o português deste README ainda está na fila.

AI QA Agent: Jira -> Playwright -> Jira

An AI agent that turns a Jira ticket into a passing end-to-end test, hands-free. It reads a ticket, explores the web app through a real browser, generates and runs a Playwright test, makes it green, then writes the result back to Jira and moves the ticket across the board. A human stays in the loop for irreversible actions.

Target app under test: SauceDemo.

Demo

A short screen capture of a full run (Jira ticket -> generated test -> green -> ticket closed) will be added here.

Architecture

RoleComponentResponsibility
Brain + loopClaude CodeDecides, writes test code, runs the workflow
InstructionsCLAUDE.mdThe playbook: workflow steps and rules
Hands + eyesPlaywright MCPDrives a real browser, inspects the DOM, finds selectors
Door to Jirasrc/jira.tsThin REST v3 client: read / move / append
Secrets.envJira credentials and SauceDemo test logins

MCP (Model Context Protocol) is an open standard for connecting tools and data to a model. Playwright MCP is what makes the agent reliable: instead of guessing selectors from the ticket text, it opens the real page and picks real selectors.

Workflow ("pick up aiqa N")

  1. Read the ticket from Jira (src/jira.ts get).
  2. Move it to In Progress.
  3. Explore SauceDemo via Playwright MCP and find real selectors.
  4. Generate tests/generated/aiqa-N.spec.ts (each ticket step is a test.step).
  5. Run with Playwright and fix until green.
  6. Append the result to the ticket description.
  7. Move it to Done.

Tech stack

  • Playwright + TypeScript (Chromium, html + json reporters)
  • Playwright MCP (browser control)
  • axios + dotenv (Jira REST API v3 client)
  • Claude Code as the agent runtime

Setup

npm install
npx playwright install chromium
cp .env.example .env   # then fill in your Jira values

The Playwright MCP server is already declared in .mcp.json (it points to playwright-mcp.config.json for the browser launch flags), so Claude Code picks it up automatically when you open this folder.

Required .env values: JIRA_BASE_URL, JIRA_EMAIL, JIRA_API_TOKEN, JIRA_PROJECT_KEY. Create the API token at id.atlassian.com -> Security -> Create API token.

Usage

# Jira helper (CLI)
npx tsx src/jira.ts get AIQA-1
npx tsx src/jira.ts move AIQA-1 "In Progress"
npx tsx src/jira.ts append AIQA-1 "Automated and passing."

# Run tests
npm test          # all tests
npm run report    # open the HTML report

Then, inside Claude Code in this folder, just say pick up aiqa 1.

Label-triggered autonomous mode

Instead of running each ticket by hand, a polling watcher picks up tickets automatically. Add the label playwright_agent to a Jira ticket and the agent runs the whole flow on its own.

# add the trigger label to a ticket
npx tsx src/jira.ts label-add AIQA-2 playwright_agent

# safe dry run (detects labeled tickets, prints the command, runs nothing)
WATCH_DRY_RUN=1 WATCH_ONESHOT=1 npx tsx scripts/watch-jira.ts

# start the watcher (polls Jira, runs the agent on each new labeled ticket)
npx tsx scripts/watch-jira.ts

scripts/watch-jira.ts polls Jira with project = AIQA AND labels = playwright_agent AND status = "To Do" and, for each new ticket, runs the agent headless:

claude -p "pick up AIQA-N ..." --model haiku --permission-mode bypassPermissions \
  --mcp-config .mcp.json --strict-mcp-config

Configurable via env: WATCH_MODEL (haiku | sonnet | opus), WATCH_INTERVAL_MS, WATCH_LABEL. This is the polling variant of the trigger; a Jira webhook would be the event-driven alternative.

Project structure

.mcp.json                Playwright MCP server definition
playwright-mcp.config.json  browser launch flags for the MCP server
.env / .env.example      secrets (env) and template
playwright.config.ts     Playwright config (chromium, reporters, baseURL)
CLAUDE.md                agent playbook (read automatically by Claude Code)
src/jira.ts              Jira REST v3 helper + CLI
scripts/seed-tickets.ts  one-off: seed ticket descriptions
scripts/watch-jira.ts    polling trigger (label-based autonomous runs)
tests/generated/         generated Playwright specs

Notes

This is the lightweight variant: Claude Code as the agent, a hand-written Jira REST client, manual trigger. It evolves naturally toward a production setup (custom agent loop on the Anthropic SDK, Jira via MCP, label-based trigger, CI, human-in-the-loop).

Ver o original no GitHub

Bom para

Relacionados