QA Assistant Playwright is a local-first AI workbench for turning QA context into practical test assets. It can read direct prompts, Jira tickets, JQL/Rovo search results, DOM snippets, and repository scans, then generate test plans, locators, Gherkin scenarios, Playwright/Selenium/Cypress skeletons, Page Object Models, and API test plans.
The project is intentionally semi-autonomous. It can propose files and run allowlisted commands, but it requires explicit user approval before writing generated test files into a repository.
- Generates structured QA output from natural-language prompts.
- Supports multiple LLM providers: OpenAI, Gemini, Claude/Anthropic, DeepSeek, Mistral, Kimi, Groq, and local Ollama.
- Uses server-side
.envkeys or temporary per-provider keys from the UI. - Distills DOM/HTML into safer locator-generation context.
- Scores locator stability and prefers role, label,
data-testid,id, then CSS. - Converts Jira ticket context into test scenarios and automation skeletons.
- Scans a local repo, proposes a test file, shows a diff, writes only after approval, and runs an allowlisted test command.
- Exports generated content as native test files, Markdown, or CSV.
qa-assistant-reliable/
backend/ FastAPI API, LLM routing, repo integration, security
frontend/ React + Vite UI
tests/ Backend tests and Playwright smoke test
api/index.py Deployment entrypoint for ASGI hosts
requirements.txt Pinned Python dependencies
package.json Root scripts for backend/frontend/e2e tests
The backend is FastAPI. Important modules:
backend/server.py: API routes, request validation, auth gate, streaming endpoint.backend/logic.py: real provider adapters for OpenAI, Gemini, Claude, DeepSeek, Mistral, Kimi, Groq, and Ollama.backend/dom_distiller.py: DOM cleanup, URL safety checks, SSRF protection.backend/repo_integration.py: repo scanning, generated file proposals, approved writes, allowlisted test commands.backend/atlassian.py: Jira issue and JQL helpers.backend/security.py: optional backend access token.
The frontend is React + Vite. The UI is organized around a visible QA pipeline:
- Generate with an LLM provider.
- Review scenarios, locators, or proposed files.
- Approve writes explicitly.
- Run allowlisted tests and inspect output.
| Provider | Key / setup | Notes |
|---|---|---|
| OpenAI | OPENAI_API_KEY |
Validated end-to-end with backend .env key fallback. |
| Gemini | GEMINI_API_KEY |
Supports text and vision through Google Generative AI SDK. |
| Claude | ANTHROPIC_API_KEY |
Supports text and vision through Anthropic SDK. |
| DeepSeek | DEEPSEEK_API_KEY |
OpenAI-compatible API. |
| Mistral | MISTRAL_API_KEY |
OpenAI-compatible API. |
| Kimi | KIMI_API_KEY |
Moonshot OpenAI-compatible API. |
| Groq | GROQ_API_KEY |
OpenAI-compatible API. |
| Ollama | local ollama serve |
Uses http://localhost:11434 by default. |
You can either put provider keys in .env or paste a temporary key in the UI sidebar. The UI key is sent to the backend for that request only and stored in browser localStorage.
Copy the example file and add only the keys you need:
cp .env.example .envCommon local configuration:
OPENAI_API_KEY=your-openai-api-key-here
QA_ASSISTANT_VERIFY_SSL=true
QA_ASSISTANT_ALLOWED_REPO_ROOTS=/Users/you/projects
QA_ASSISTANT_REPO_COMMAND_TIMEOUT_SECONDS=60Optional backend auth:
QA_ASSISTANT_ACCESS_TOKEN=choose-a-private-tokenWhen QA_ASSISTANT_ACCESS_TOKEN is set, the frontend must send the same value as X-Backend-Token. The UI has a field for this in the sidebar.
.envand.env.*are ignored by Git.- Never commit real provider keys.
- Repo writes require explicit approval from the UI.
- Repo operations are restricted by
QA_ASSISTANT_ALLOWED_REPO_ROOTS. - Test execution is allowlisted and time-limited.
- URL fetching is restricted to public
http/https, blocks private IP ranges, limits redirects, and caps response size. QA_ASSISTANT_VERIFY_SSL=falseexists only for trusted corporate proxy environments.
Requirements:
- Python 3.11+
- Node.js 20+
- npm
Create a Python virtual environment:
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txtInstall Node dependencies:
npm install
cd frontend
npm install
cd ..Start the backend:
.venv/bin/python -m uvicorn backend.server:app --reload --host 127.0.0.1 --port 8010Start the frontend:
cd frontend
QA_API_TARGET=http://127.0.0.1:8010 npm run dev -- --host 127.0.0.1 --port 5181Open:
http://127.0.0.1:5181
Use OpenAI or another configured provider, choose Gherkin scenarios, and send:
Generate one smoke scenario for validating that the QA assistant opens, shows the repo integration panel, and has a chat input.
For repo integration, use a prompt like:
Generate a Playwright smoke test for the QA assistant workflow: open the app, verify the repo integration panel is visible, verify the chat input exists, and verify output mode selection is available.
- Enter an absolute repo path.
- Choose an output target, such as Playwright.
- Describe the approved testing objective.
- Click
Scan repo. - Click
Propose test file. - Review the generated diff.
- Check the approval box.
- Click
Write approved file. - Run an allowlisted command such as
npm test.
The app never silently modifies your repo.
Run backend and frontend unit tests:
npm testRun only backend tests:
npm run test:backendRun only frontend tests:
npm run test:frontendRun the Playwright smoke test against a running frontend:
PLAYWRIGHT_BASE_URL=http://127.0.0.1:5181 npm run test:e2eCurrent validation status before publishing:
- Backend tests: 16 passed.
- Frontend unit tests: 17 passed.
- Playwright smoke test: 1 passed.
- OpenAI backend
.envkey fallback: validated through the UI.
Recommended for personal use. Run both servers on 127.0.0.1, keep provider keys in .env, and restrict repo roots.
Set QA_ASSISTANT_ACCESS_TOKEN, use HTTPS behind a trusted proxy, and keep allowed repo roots narrow.
Do not expose this app publicly without real authentication, rate limiting, secret management, audit logging, and careful repo sandboxing.
Before pushing:
git status --short
git check-ignore .envExpected:
.envshould be ignored..venv/,node_modules/,frontend/node_modules/,test-results/, and build output should not be committed.
No license has been selected yet. Add one before publishing if you want others to use or modify this project under explicit terms.