Software Testing / Learning brief

Tom stubs the task list in Cypress

What this means in plain language

Tom tests an empty list and a full list with a stub and a fixture file, and Mei adds a sign-in command.

Understand the full idea, step by step

Analogy: a film set. A film crew does not need a real storm to film one. They use a rain machine, a prop box and a card of stage directions.

The scene is the same each time.

A stub is the rain machine. Tom, the tester at Daily List, a to-do list app, uses it to control what the server says.

PLAIN WORDS · 1 in this section
stub
a simple fake part that gives fixed answers

Evidence & review

REVIEWED 2026-10-31

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.

Using Cypress stubs, fixtures and custom commands. The people and app are invented.

What this brief simplifies: Fiction labelled SYNTHETIC / TRAINING ONLY. Sources were seen only as search excerpts. Tools and screens change, and each team sets its own.

Sources for this brief — 4 sources
  1. Market practice

    cy.intercept() (Cypress docs) ↗ — Cypress · Cypress docs: the intercept command can spy on, stub and change network requests, and a route can return a fixed response from a fixture file (search excerpt, page not opened)

    The reference page for spying on, stubbing and changing network requests in a Cypress test. Official project documentation. · Checked 2026-10-31

    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.

  2. Market practice

    Intercepting network requests (Cypress docs) ↗ — Cypress · Cypress docs: a stub lets you control the body, status, headers and delay of a response, and an intercept should be set before the page visit so it does not miss early requests (search excerpt, page not opened)

    A guide to stubbing responses, waiting on requests and controlling the body, status, headers and delay. Official project documentation. · Checked 2026-10-31

    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

    Custom commands (Cypress docs) ↗ — Cypress · Cypress docs: a custom command is added once, usually in the support file that runs before every spec, and plain functions are often better when only one spec needs the step (search excerpt, page not opened)

    The reference for adding and overwriting commands, and where to keep them. Official project documentation. · Checked 2026-10-31

    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 HERECypress: stub the network, load fixtures, write custom commandsControl what the server sends back, keep test data in files, and wrap repeated steps into your own commands. This is the second step after your first Cypress test.Opens at L0 Explain simply · about 16 min

Related briefs