Skip to content

Use case · User stories

Generate test cases from user stories

Paste a user story with its acceptance criteria and Testfolio drafts scenarios and step-by-step manual test cases that trace back to each criterion, including the negative and boundary cases that are easy to skip when writing by hand.

Open the test case generator

How it works

  1. Paste the story, its acceptance criteria and anything else the team agreed (limits, messages, roles, what's out of scope).
  2. Choose Generate tests. Each scenario groups the test cases for one behaviour; each test case has preconditions, test data and steps with an action and the expected result.
  3. Review: edit any field, answer open questions, or ask the AI to improve a scenario. Then export.

Example

Input: a user story with acceptance criteria
PROJ-318 — Apply a discount code at checkout

As a shopper, I want to apply a discount code at checkout so that I pay the promoted price.

Acceptance criteria
AC-1: The checkout page has a "Discount code" field and an Apply button.
AC-2: Codes are 6–12 letters or digits and are not case-sensitive.
AC-3: A valid code reduces the order subtotal by its percentage and shows
      "Code SPRING10 applied: −10%" under the subtotal.
AC-4: Only one code can be active; applying a second code replaces the first.
AC-5: An expired code shows "This code has expired." and the total is unchanged.
AC-6: Codes don't apply to gift cards in the cart.

Out of scope: free-shipping codes.

Two illustrative test cases of the kind Testfolio drafts for this story, shortened for this page (generated output varies):

TC-004Accept a 12-character code typed in lower casePriority: Medium
Preconditions:
A cart with one regular (non-gift-card) item. Code SPRING2026OK (12 characters, 10% off) is active.
Test data:
Code: spring2026ok
Basis:
Documented (AC-2, AC-3)
#ActionExpected result
1Enter the code in the Discount code field and choose Apply.The message "Code SPRING2026OK applied: −10%" appears under the subtotal.
2Compare the subtotal with the price before applying the code.The subtotal is reduced by 10%.
TC-009Expired code leaves the total unchangedPriority: High
Preconditions:
A cart with one regular item. Code WINTER10 expired yesterday.
Test data:
Code: WINTER10
Basis:
Documented (AC-5)
#ActionExpected result
1Note the order total, enter WINTER10 and choose Apply.The message "This code has expired." is shown.
2Check the order total.The total equals the value noted before applying the code.

The story doesn't say how the discount is calculated when the cart holds both a gift card and regular items (AC-6). For gaps like this, Testfolio is designed to add an open question and mark the dependent test as needing clarification instead of inventing a rule. When you answer it, Update affected tests proposes changes for you to accept or reject.

What makes the output useful

  • References back to the acceptance criteria (AC-1, AC-2, …) so you can check coverage per criterion.
  • Boundary values taken from the story, such as 6 and 12 characters, rather than generic “long input” tests.
  • A basis on each test: Documented when the story says it, Assumption or Exploratory when it doesn't.
  • Export to Excel, Markdown or CSV, with a column layout you can map into your test management tool.

Limitations

  • The tests reflect the story you paste. A one-line story without criteria gives thin tests, or a request for more detail.
  • Generated tests are a draft: review them before you rely on them. A test case is not evidence that anything was run.
  • There is no direct import into Jira, TestRail or similar tools; exports are general-purpose files.

New to writing acceptance-criteria-based tests? The guide to writing test cases has a template you can reuse.

Try it with your own requirements

Browsing and sample results need no account. Generating tests needs a sign-in and uses credits; editing and exports are free.

Open the test case generator