Software Testing / Learning brief

Tom cooks one recipe with five ingredients

What this means in plain language

Tom copied the Add task test five times and every page change meant five edits. A soup recipe story shows how a loop makes one test per input and how a setting points the suite at any site.

Understand the full idea, step by step

A cook has one recipe for soup. Today the main ingredient is carrots. Tomorrow it is tomatoes. The steps are the same, and nobody writes a new recipe for each vegetable.

Tom had been writing a new recipe for each input, and he was tired of it.

It was time to write the recipe once and change only the ingredients.

Evidence & review

REVIEWED 2026-10-18

The date on this lesson is when it went up on Payments Signal, not when its material was written — most of these were brought across from an earlier catalogue in a single run, which is why so many of them share a date. What the lesson says about the world is dated by the review above and by the sources below it.

Playwright Test as taught in this academy, with an invented app and invented people. Tool details come from vendor reference pages seen only as search excerpts.

What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Sources were seen only as search excerpts. The recipe is a teaching picture. The site address is a teaching address that does not exist.

Sources for this brief — 4 sources
  1. Market practice

    Parameterize tests (Playwright documentation) ↗ — Microsoft (Playwright) · Build an array of data and call forEach to register one test per entry, with the title taken from the data; put hooks outside the loop to run once, or inside a describe in the loop to run for each; dotenv.config in playwright.config.ts reads a .env file into process.env (search excerpt, page not opened)

    Data-generated tests and configuration. A beforeEach outside the loop is declared once but executes before every selected test; the guide wording about executing once must not be read as once per file. Per-item describe gives item-specific hook scope. · Checked 2026-11-06

    Primary source opened and operative text inspected on 6 November 2026. Scope: Complete extracted primary article; examples inspected, not executed. Current live Playwright documentation reflects 1.65 where stated; explicit older examples retain their version. Source inspection is not an execution or compatibility-test claim. See the completed v45 Playwright analysis for source discrepancies and exact reading boundaries.

  2. Market practice

    III. Config (The Twelve-Factor App) ↗ — Adam Wiggins · Keep config, including credentials, in the environment and not in the code (search excerpt, page not opened)

    Says config is whatever changes between deploys and should be kept in the environment, not in the code. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  3. Market practice

    Playwright Test class reference (Playwright documentation) ↗ — Microsoft (Playwright) · test.step groups actions under a name in the report; test.info() returns the TestInfo of the running test (search excerpt, page not opened)

    Reference for test, test.step, test.setTimeout, test.slow and test.only. Says test.step declares a step that is shown in the report and can be nested, test.slow gives a test triple the default timeout and test.setTimeout sets an explicit limit. Vendor documentation for one tool. Practitioner guidance, not a standard. · Checked 2026-10-18

    Found through a web search; the page was not opened (search excerpt, page not opened). Version: Web page, no edition number. Licence terms were not read, so put it in your own words and do not quote it. Open the page and confirm what it says before relying on any detail.

  4. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal

    This site's own simplified teaching models. · Checked 2026-07-12

    Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.

Learn this properly

START HEREParameterized and data-driven tests, and environment variablesWrite one test and run it with many sets of data, and switch the site address or a secret from outside the code, without copying the test.Opens at L0 Explain simply · about 17 min

Related briefs

Tom cooks the same recipe in Python

Leo's team writes tests in Python. Tom has only seen TypeScript. He finds that the steps stay the same, and the names, the runner and the flags change, like a familiar recipe in a new kitchen.

READ BRIEF