← All pillars
The scenario

Scenarios

A case used to be two hundred lines of script that mostly repeated the previous case. What is left in the file now is the part that is actually about your application.

cases/report.cases.json
{
  "fixtures": [
    { "name": "report", "environment": "dark", "flag": "--theme",
      "language": "pt-BR", "shareable": true }
  ],
  "cases": [
    {
      "name":     "the report pane comes back in the resolved language",
      "catches":  "a translated menu entry that leaves its labels in English",
      "filed":    "WW63",
      "tags":     ["smoke", "i18n"],
      "needs":    ["the foreground belongs to the window under test"],
      "fixture":  "report",
      "steps": [
        { "locator": "MenuItem#languagePtBR", "act": "invoke",
          "named": "switch to pt-BR" },
        { "locator": "Pane#reportHost > Text", "act": "read",
          "covers": "report.labels" }, // every string the key declares
        { "locator": "Text#total", "act": "read",
          "expectReported": "monthlyTotal" }, // the app's own read-out
        { "locator": "Pane#reportHost", "act": "capture",
          "with": "report.pt-BR" }
      ]
    }
  ]
}

What the engine owns

The loop, the waits, the retries and the verdicts. Which is why a fix to any of them is applied once rather than to some of twenty-seven copies of a runner while the rest keep the bug.

What the file owns

  • ✓Steps, locators, acts and expectations, as fields.
  • ✓needs — what the machine must have before anything can be observed, by the name the engine gives the condition, so an absence is named as unchecked rather than going red for a reason about the desk.
  • ✓fixtures — the launch each case names: its sampled environment, the flag that environment arrives through, the arguments, the variables, and the language the window it opens is in.
  • ✓shareable on the fixture and onlyReads on the case, so three cases that merely read one window do not each pay their own launch.
  • ✓forEach — the key whose every declared string the case runs once for, with the member reaching a locator through {}.
  • ✓catches — the defect the case exists for, so a case nobody can justify is visible and one removed by accident is missed.

Validated against the loader's own schema

Every field, as it is written, and by the same schema the loader reads rather than by a second copy of it. A refusal costs a retry and never a deletion — which matters most for the caller writing the file a field at a time rather than pasting it whole.

The tools that carry that schema →

Run everything, one case, or one tag

A single case is ten seconds when a single act is what changed, and the run names every case it left alone rather than reporting a total that quietly moved. A selector matching nothing is refused with the names there are — a run of no cases has no failure and no hole in it, so it reads as a pass about nothing.