Turn a requirement or Jira ticket into executable test cases, or review an existing set for coverage gaps and duplicates. Fill the missing cases, edit the merged set, then export it to Excel ready for testers. From there, write bug reports from rough notes or a failed test run, turn test cases into Playwright tests, and repair the locators a page change broke.
The live demo needs your own API key for the AI provider you choose, Claude by default (enter it in the sidebar) โ it's not shared or stored anywhere.
Generating and reviewing share one core engine and the same per-project business rules, and so do the other pages.
Each project is a single YAML file: domain rules, glossary, platform, and its own test ID format.
Generate from a user story, reuse the current session, or upload an external .xlsx/.csv test set.
Create structured cases, or score coverage and identify missing test types, gaps, and duplicates.
Generate missing cases, edit and merge them, then download a validated, pre-styled .xlsx file.
A static mock-up of the Generator plus the coverage report available from the Reviewer page. Want the real thing? Try the live demo โ
| Test ID | Title | Priority | Type |
|---|---|---|---|
| TC_LOGIN_001 | Successful login with a valid OTP | High | Positive |
| TC_LOGIN_002 | Account temporarily locked after 3 incorrect OTP attempts | High | Negative |
| TC_LOGIN_003 | OTP can't be used after expiring at 5 minutes | Medium | Edge case |
| TC_LOGIN_004 | Phone number with an invalid format | Medium | Negative |
| TC_LOGIN_005 | OTP input screen is responsive on small displays | Low | UI/UX |
Three more pages take the work on from the test cases, with the same project config and the same AI provider.
Turns rough notes about a defect into a structured bug report: severity, priority, steps, expected and actual, and the questions still open. Or upload a test run and get one report per failed row. Export as Markdown or Excel.
Turns up to 10 web test cases into a Playwright + TypeScript project with page objects, as a zip. What the AI cannot express becomes a test.fixme with a TODO instead of a guess.
A project whose platform is api gets API test cases, and Automation writes them as Playwright API tests in the same project as the web tests. Secrets go to .env.
Upload a failing page object with the error and the page's current HTML: only its broken locators are repaired, with a diff, a choice per fix, and a verdict that flags a possible app bug.
Built for real use in a QA workflow, not just a demo.
Domain rules, glossary, platform, test ID format โ decoupled from the core engine, no code changes needed.
Automatically retries with backoff on rate limits or connection loss to the AI provider.
Shows token usage and prompt caching for every generation run, and an estimated USD cost when the provider is Claude.
Keeps recent generation runs from the current session, viewable or restorable anytime.
An .xlsx file with priority color-coding, a frozen header, and a Summary sheet โ usable right away.
Validated by Pydantic against a fixed schema โ no worrying about malformed JSON from the AI.
Scores requirement coverage and reports missing test types, concrete gaps, and likely duplicate cases.
Imports .xlsx/.csv test sets and suggests a column mapping that the tester confirms before review.
Generates cases only for identified gaps, handles test-ID collisions, and exports the validated merged set.
Downloads the test cases as a .feature file: one Scenario each, tagged with its test id, module, priority and type. No AI call is made for it.
Claude is the default; OpenAI, Google Gemini, or any server that speaks the OpenAI chat-completions format (Ollama, LM Studio, OpenRouter) can take its place. Their replies are checked against the same schemas.
Requires Python โฅ 3.10. See the full details in the README.
git clone https://github.com/vannt-dev/ai-testcase-generator.git
cd ai-testcase-generator
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # fill in ANTHROPIC_API_KEY, or another provider's key
streamlit run app.py