Testing a regular web app is mostly about known inputs and known outputs. You click a button, you expect a page. A story generator breaks that habit on day one. Ask it for the same chapter twice and you get two different chapters, both of them “correct”. So how do you write a test plan for a product whose whole job is to be unpredictable in a good way?
This article walks through the checks we would put in place for any interactive fiction product built on a large language model. The examples lean on adult fiction platforms, because that is where the requirements are strictest: readers expect continuity across dozens of chapters, and the platform has hard content rules it cannot break.
Table of Contents
ToggleStart by deciding what “correct” means
Before writing a single test case, sit down with the product owner and list the properties a good story must keep. In our experience the list is short and concrete:
- Characters keep their names, ages, appearance and relationships from chapter to chapter.
- Facts the reader set up (a city, a job, a backstory) are not quietly rewritten.
- The text stays in the language, tense and point of view the reader picked.
- The model never crosses the platform’s content boundaries, no matter how the request is phrased.
- Response time and cost per chapter stay inside agreed limits.
Everything else, such as style, plot twists or word choice, is allowed to vary. That separation matters. If your tests try to pin down style, they will fail on every run and the team will learn to ignore them.
Consistency tests: the character sheet
The cheapest useful test is a character sheet check. Create a fixed story setup with three or four characters, each with five or six hard attributes. Generate ten chapters. After each chapter, run an extraction step that pulls every mention of each character and compares it to the sheet.
You can do the extraction with a second, smaller model or with plain pattern matching for things like names and eye colour. The point is not to be perfect. The point is to catch the obvious failures: a character who was 34 in chapter one becoming “the young student” in chapter six, or a partner’s name changing halfway through a scene.
Track the failure rate per hundred chapters and put it on a dashboard. When someone changes the system prompt or swaps the model version, that number is the first thing you look at.
Memory tests: what happens after chapter twenty
Most story products cannot fit an entire long story into the model’s context window. They summarise older chapters, store key facts in a separate memory, or retrieve relevant passages on demand. Each of these approaches fails in its own way, so test them directly.
A good memory test plants a detail early and asks about it late. In chapter two, the heroine loses a silver ring at a train station. In chapter twenty-two, the reader asks her to remember where she lost it. The test passes if the answer matches. Build a small library of these “planted facts” and run them against long synthetic stories every night.
Also test the opposite case: details that the reader explicitly changed. If the reader rewrote chapter five so the character moved from Boston to Denver, the memory must forget Boston. Stale memory is one of the most common complaints readers send to support.
Regression tests for prompt changes
In generative products, the system prompt is code. It deserves version control, review and regression tests like any other code. The trouble is that output varies, so a classic snapshot test is useless.
What works better is a fixed evaluation set of fifty to a hundred story setups and a rubric. For each setup, generate the first chapter with the old prompt and with the new one. Score both against the rubric, either with human reviewers or with a grader model that has been checked against human scores. Ship the new prompt only if it does not lose on the properties you defined at the start.
Keep the evaluation set stable. If you edit it every sprint, you lose the ability to compare months.
Content-boundary tests
For any platform that allows mature fiction, this is the part legal and trust teams care about. An AI erotica generator that writes adult fiction for verified adults still has lines it cannot cross: no minors, no real people without consent, no content that breaks the law where the service operates.
Testing these boundaries means writing adversarial prompts on purpose. Some of them are direct. Most are indirect: ages hidden in arithmetic, school settings described without the word “school”, role-play that drifts slowly over many turns. Keep this red-team set private, grow it every time support reports a new trick, and run it on every model or prompt release.
Measure two numbers here, not one. The first is how often the model produces something it should have refused. The second is how often it refuses something that was fine. A product that blocks ordinary romance between two adult characters will lose readers just as surely as one that leaks unsafe content.
Reference sets from real reading behaviour
Synthetic test prompts only go so far. Real readers ask for things testers do not imagine. One practical source of realistic test material is the platform’s own catalogue. Many services keep a browsable library of NSFW stories grouped by theme, and the themes readers actually open most are a good guide to which setups your evaluation set should cover first.
Sample setups from the most visited categories, strip anything personal, and turn them into test cases. Re-sample every quarter so the test set follows what readers care about now, not what they cared about at launch.
Performance and cost
Readers of serial fiction are patient with a good story and impatient with a spinner. Set a target for time to first token and for total chapter time, and measure them under load, not on an empty staging server. Long contexts get slower and more expensive as stories grow, so include long stories in your load tests.
Cost belongs in the test plan too. Log tokens per chapter by story length. If a prompt change quietly doubles the context sent with each request, you want a failing check, not a surprise invoice.
Human review still matters
Automated checks catch regressions. They do not tell you whether a chapter is any good. Set aside time each week for a small group of reviewers to read random chapters from production, with personal data removed. Ask them simple questions: did it follow the reader’s request, did it stay consistent, would you keep reading?
Their notes are where the next automated test comes from. Every time reviewers spot the same failure twice, turn it into a case in the nightly suite.
A short checklist to take away
- Define the properties that must hold, and leave style free.
- Run character sheet checks on every release.
- Plant facts early in long stories and test recall late.
- Treat the system prompt as code, with review and a fixed evaluation set.
- Keep a private red-team set and measure both leaks and over-refusals.
- Load test with long stories and track cost per chapter.
- Read real output every week and feed what you find back into the suite.
None of this makes a story generator predictable, and it should not. It makes it dependable, which is what readers and the people running the platform actually need.
Want more testing guides in your Google results? Add Testmetry as a preferred source.


