PhraseryPhrasery homeGet Phrasery
Tests & QA21 categories

Design test data for this feature

When every test starts with forty lines of fixture setup.

Longtest-datafixturesdesign
Design the test data for the feature below.

1. List the distinct states a record can be in that tests must cover, including the states that only exist in old production data.
2. Propose a small set of named fixtures or builders covering those states, each with an explicit name describing what makes it interesting.
3. Show the builder pattern I should use so a test can specify only the field it cares about and inherit sane defaults.
4. Include awkward realistic data: long strings, non-Latin scripts, emoji, leading and trailing whitespace, names with apostrophes, extreme numbers, and timezone-sensitive dates.
5. State how data is isolated and cleaned between tests, and what breaks if it is not.
6. Flag anything that must never be real or realistic, such as genuine personal data.

Feature and current fixtures:

Making it yours

  • Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
  • Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
  • If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.

Test strategy. Unit or integration, what to skip, fixture design, and pruning a suite that costs too much.

Related prompts

Keep this one

Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.

Add to your browser โ€” free