Test case generator for manual testers
Free and open source (MIT). Turn a requirement, a Jira ticket or a whole requirement document into test cases and export them to an Excel file manual testers can work from directly. Use your own API key for Claude, OpenAI or Google Gemini, or a local model server such as Ollama or LM Studio with no key. Review an existing set for coverage gaps and duplicates and fill the missing cases. 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.
# language: en Feature: Shop app # Open questions to confirm with BA/Dev: # - How many OTP attempts are allowed? @TC_LOGIN_001 @Login @High @Positive @All Scenario: Successful login with valid phone number + OTP # Test data: Phone: 0912345678, OTP: 123456 Given Account is registered, not logged in When Enter phone number And Enter correct OTP And Tap Login Then Login succeeds, redirected to the Home screen
Real output of the Gherkin export, which makes no AI call, for the sample test cases in tests/test_gherkin_exporter.py.
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.
Paste a user story or upload a .docx, .pdf, .md, .txt or .csv requirement file (generated section by section), 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.
Every run goes to the history (newest 50). The History page opens any run to download it again as Excel or Gherkin, put it back in the Generator, or delete it. Runs stay in your browser session, so on a shared server nobody sees yours; on your own machine, set TESTCASE_HISTORY_DIR to save them to a git-ignored folder that loads when the app starts.
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.
Each test case names the acceptance criteria it covers in a Covers column; a panel and a Traceability sheet in the Excel file flag criteria with no test.
Pick up to 20 test cases and write a note such as "add negative cases for an empty email": the AI rewrites only those, keeps their ids, and shows before and after. Nothing changes until you accept, and the history can undo it.
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, type and the criteria it covers (@AC-1). 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