AI Test Case Generation: from Requirements to Test Cases you can Run

Point Testver at a requirement, a Jira story or your existing scripts, and it writes structured test cases for every angle that matters, grounded in your real app. Review, save, and hand the automatable ones to the AI.

T
The Testver team · 10 min read

Every release starts the same way: a requirement document, a stack of Jira stories, and a blank test case template. Writing the happy path is quick. Thinking through the negative cases, the boundaries, the error handling and each user role is where the hours go, and where the gaps slip in.

AI Test Generation in Testver writes that first draft for you. Point it at a requirement, a note, a document or a Jira issue, and it reads each requirement, works through the testing angles that apply, and streams back structured test cases you can review and save. Point it at your existing automation scripts and it writes the manual test cases they cover. And unlike a generic AI, it can ground every step in your real application, so the steps name your actual pages and buttons instead of plausible inventions.

This post covers how it works, every option, and what happens after you save, through to automated tests that pass.

Start with your source material

AI Test Generation works from material already stored in Testver. You keep it on the Sources page, in four tabs:

  • Requirements: requirement documents, each with a priority.

  • Notes: free text, such as a quick description of a feature or meeting notes.

  • Jira: add an issue by hand, or pull up to 50 at a time with a JQL query. Acceptance criteria come with them.

  • Other Sources: any other file.

Testver reads the text of PDFs, Word documents (.docx), Markdown, plain text, HTML, CSV, JSON, XML, YAML and log files. Scanned PDFs and images have no text to read, so use a text-based copy.

Two ways to generate

Mode

You give it

You get

From Sources

One requirement, note, Jira issue or document

Test cases grouped by the requirements the AI found in it, each labelled with its testing angle and priority, plus a coverage matrix

Reverse Engineer

Automation script files, or individual tests in them

Manual test cases written from those scripts, each labelled with the script it came from

Reverse Engineer is the fastest way to bring an existing automation suite into test management. Pick whole files or individual tests, or click Select All Unmapped. Tests that are already linked to a test case are dimmed and can't be picked, so you never write the same case twice.

The options

Option

What it does

Target Folder

The Test Cases folder the saved cases go into.

Coverage: High-level or Detailed

High-level, the default, writes one to three focused tests per requirement. Detailed aims for exhaustive coverage: at least one test for every testing angle that applies, plus variants for each user role, followed by a pass that fills any gaps. Detailed asks you to confirm first.

Use app knowledge

Grounds the steps in what Testver has actually seen of your application (see below). On by default once your app has been explored.

Incremental mode

Skips requirements that already have matching test cases, so after you edit a source you pay only for what changed.

Auto Save

Saves the cases as soon as generation finishes, without a Save click.

There's no "how many test cases?" box. The AI decides from the testing angles that apply to each requirement: typically one to four, and up to six.

What happens when you click Generate

  1. Extract requirements. The AI reads the source and splits it into individual requirements: REQ-1, REQ-2 and so on.

  2. Generate for each requirement. For each one, it works out which testing angles apply and writes test cases for them.

  3. Fill the gaps. It checks the coverage and fills what's missing.

Results stream in live. Each test case appears the moment it's written, and a progress banner shows the elapsed time, the current step, and the requirement being worked on. If the AI's own review flags a weak case, the banner says so. You can cancel at any time and keep everything that has already arrived.

If the source already has test cases and Incremental mode is off, Testver warns you first. You can cancel, Generate Anyway (which may create duplicates), or Use Incremental Mode, which is the recommended choice.

What a generated test case looks like

Each case is a complete, structured test case: a title, priority (critical, high, medium or low), type (functional, regression, smoke, integration, end-to-end, API, performance or security), an optional description, tags, preconditions, and numbered steps, each with an action, an expected result and optional test data.

Each case is also labelled with the testing angle it takes, so you can see at a glance how well a requirement is covered:

  • happy path, negative, boundary, equivalence, error handling

  • security, performance, accessibility, compatibility

  • integration, data validation

When a requirement involves different user roles, a case is also labelled with the persona it tests as, such as a guest or an admin.

Reviewing the results

You don't have to read a wall of text. The results come with tools for reviewing them quickly:

  • Group by requirement, testing angle or priority, or show a flat list.

  • Filter by testing angle, priority, persona, and quality (grounded, automatable, needs a look), and search across titles, preconditions, tags and steps.

  • Detected Application Domain shows what kind of application the AI thinks the source describes, and the key concerns for it.

  • Skipped requirements lists what Incremental mode left out because it was already covered.

  • The traceability matrix maps every requirement against every testing angle. With Detailed coverage, an empty cell is a genuine gap and is marked, with a count of requirements that have gaps. With High-level coverage, empty cells are expected, and Deepen fills in a requirement that deserves more.

Grounding: steps from your real application

Here's the problem with most AI-written test cases. The assertions are right, because they come from your requirement. Everything else is invented: the page names, the button labels, which role can reach which screen, sometimes whether the path exists at all. It reads well, and it's fiction.

Testver fixes the second half with app knowledge. Once Explore & Automate has walked your application, generation uses what it actually recorded for navigation and wording. Each input has a clear job:

Input

Decides

Never decides

Your requirement or document

Every assertion: what the test expects and what counts as a pass

How to get there

App knowledge from exploration

Navigation, page names, control names, which role can reach what

What the test asserts

Your existing test cases

House style: how detailed steps are, tags, how your team writes test data

Either of the above

Each generated case shows how well it's grounded: grounded (every step matches a control exploration actually saw), partly grounded (read the unmatched steps first), or navigation invented (no explored page backs it). Each step is marked observed or not observed, with the page it was matched against, and Grounded by names the files behind it so you can check for yourself. These markers are worked out from the recorded pages, not claimed by the AI about its own work.

The requirement always wins

What if your app and your requirement disagree? Say the requirement says a password needs eight characters, but the sign-up form accepts four. The test case asserts the requirement, is marked as expected to fail, and shows Possible spec drift with both sides.

This matters more than it looks. If what the app does today could overwrite the requirement, every current bug would quietly become a passing test. A red test that names a real disagreement is worth far more than a green one that encodes the defect.

No exploration data yet? Everything still works: the assertions are still correct, and the navigation is the AI's best guess. Run Explore & Automate once, then use Deepen on the requirements that matter to regenerate them with real navigation.

Can this be automated?

Every generated case also gets an automation verdict, with a one-sentence reason:

  • Automatable: a run can execute it unattended. Signing in, filling forms, using a sandbox payment card, a multi-page checkout and seeded test data are all ordinary automation.

  • Needs setup: automatable once something exists first, such as two sessions at once or data of a particular age.

  • Manual: a step needs something no automated run can do, such as a real emailed link, a one-time code, a CAPTCHA, physical hardware, someone else's approval, or a human judgement like "looks professional".

You can override any verdict. Every case is saved either way: a manual case is still a test case, just one a person runs.

See what you'll get before you spend: Choose requirements

Generate does everything in one pass. Choose requirements splits it in two, so you can decide what to spend AI on:

  1. Testver extracts the requirements from your source and stops.

  2. Each requirement shows a Grounding column, such as 9 pages explored or not explored, so you know before you start how much of the result will rest on real pages. Requirements that drifted from the app before are called out too.

  3. Tick the ones you want and click Generate. Only those are generated, and the header sums up the result, for example 11 generated · 8 grounded · 6 automatable.

Save, then automate

Tick the cases you want and click Save Selected, or Save All. They go into your Test Cases catalog, in the folder you chose, each linked back to the source and requirement it came from.

Saving opens a summary of what was added:

  • Each new case with its TC- id, the requirement it verifies, and its grounding and automation verdicts.

  • How many can be automated, with Automate in Web mode.

  • Cases held back because they need setup or a person, each with its reason.

  • Cases expected to fail because of spec drift.

  • Requirement coverage and automated coverage, plus any requirements still unexplored.

Automate in Web mode hands the automatable cases to the AI Assistant. It writes each test in your own framework, runs it until it passes, and links the script back to its test case in Script Mapping. In a few clicks you go from a requirement document to test cases to passing automated tests, all linked together.

What you can do next

  • Plan a test run: on the Sources page, Create Plan bundles every test case from a source into a test plan with a cycle, ready to run.

  • Track coverage: the Coverage pages follow each requirement to its test cases, automation and latest results.

  • Edit the cases: generated cases are ordinary test cases. Refine them in Test Cases, with full version history.

  • Re-run safely: each source shows how many test cases it has produced. After you edit a source, use Incremental mode to generate only what's new.

Or just ask the AI Assistant

You can also generate test cases in a conversation. In the AI Assistant, attach a source with the paperclip (Add from Sources) or by typing #, and ask for test cases. The cases it writes are linked back to that source too.

Tips for better results

  • One well-scoped source at a time. Cleaner input gives cleaner, more focused test cases.

  • Explore your app first. One Explore & Automate run turns invented navigation into real steps.

  • Use Choose requirements on large documents, to generate only what matters now.

  • Start High-level, then Deepen the critical requirements, rather than generating everything in Detailed.

  • Don't Save All blindly. Group by requirement, skim, and keep the good ones.

  • Leave Auto Save off while you're getting a feel for the results.

Good to know

  • AI Test Generation needs AI. Use Testver cloud AI, where you pay only for what you use and the Starter plan is free, or a local model through Ollama or LM Studio.

  • You choose which cases to keep before saving. To change wording or steps, save first, then edit in Test Cases.

  • The screen doesn't keep a history of past generations. Saved cases live in your catalog, and each source's test case count records what it has produced.

Try it

Add a requirement on the Sources page, or pull a Jira story. Open AI Test Gen, select it, and click Generate. Watch the cases arrive, save the good ones, and hand the automatable ones to the AI Assistant. The full guide is at docs.testver.com/test-management/ai-test-gen.

For the bigger picture, read Test management with Testver. New to Testver? Run testver serve in your test project and follow the installation guide.

#AI Testing#Test Management#AI Test Engineer#Test Cases

Keep reading

Put these ideas to work

Turn your framework into an AI-powered testing platform

Self-hosted, on the stack you already use. Free to start.

AI Test Case Generation: from Requirements to Test Cases you can Run · Testver