Software Testing / Learning brief

Tom writes a shell script that runs the tests

What this means in plain language

Tom writes a script with a shebang, set -e and an if check, makes it runnable, and adds a curl and jq line to check the API.

Understand the full idea, step by step

Analogy: a shop opening checklist. Before the shop opens, the owner follows a paper list. Each line is one job, done in order. If a job fails, such as no power, the owner stops and does not open. At the end the owner writes one note: open, or not open. A phone call to the supplier can check that a delivery is ready.

A shell script (a text file of terminal commands) is that list. Each command is a job. The exit code (a number that says how the job went) is the note.

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.

Synthetic Daily List teaching scenario; selected publisher documentation scopes are stated in the source drawer. No live service configuration was tested.

What this brief simplifies: SYNTHETIC / TRAINING ONLY. Commands and policies use the stated local fixture and version; product screens, permissions and workflows can differ. Official figure reproduction is not included.

Sources for this brief — 9 sources
  1. Market practice

    GNU Bash Reference Manual ↗ — GNU · Bash 5.2 publisher tagged source — Selected Pipelines, Redirections, Environment, Shell Scripts, special parameters, errexit, pipefail, ENV/BASH_ENV and kill.

    Selected Pipelines, Redirections, Environment, Shell Scripts, special parameters, errexit, pipefail, ENV/BASH_ENV and kill. · Checked 2026-11-07

    Selected publisher sections read for Testing Tools audit. Bash 5.2 publisher tagged source. This is not live service testing or a full-publication certification.

  2. Market practice

    GNU file permissions: symbolic modes ↗ — GNU · Coreutils 9.7 included permissions chapter — Symbolic Modes/Setting Permissions/Umask: u owner, + add, x execute; omitted user is affected by umask. Use chmod u+x for this example.

    Symbolic Modes/Setting Permissions/Umask: u owner, + add, x execute; omitted user is affected by umask. Use chmod u+x for this example. · Checked 2026-11-07

    Selected publisher sections read for Testing Tools audit. Coreutils 9.7 included permissions chapter. This is not live service testing or a full-publication certification.

  3. Market practice

    curl --fail option ↗ — curl project · 8.14.1 — Full option: HTTP >=400 normally exits22 and suppresses response body; authentication caveats include401/407.

    Full option: HTTP >=400 normally exits22 and suppresses response body; authentication caveats include401/407. · Checked 2026-11-07

    Selected publisher sections read for Testing Tools audit. 8.14.1. This is not live service testing or a full-publication certification.

  4. Market practice

    curl --fail-with-body option ↗ — curl project · 8.14.1 — Full option: HTTP failure retains body, introduced7.76.0. Selected silent/show-error option files also read for -sS.

    Full option: HTTP failure retains body, introduced7.76.0. Selected silent/show-error option files also read for -sS. · Checked 2026-11-07

    Selected publisher sections read for Testing Tools audit. 8.14.1. This is not live service testing or a full-publication certification.

  5. Market practice

    jq 1.8 manual ↗ — jq project · 1.8 manual; publisher jq-1.8.1 source compared — Invoking jq: input streams, shell quoting, -r and -e statuses0/1/4; -e tests last result against false/null, not strict boolean true.

    Invoking jq: input streams, shell quoting, -r and -e statuses0/1/4; -e tests last result against false/null, not strict boolean true. · Checked 2026-11-07

    Selected publisher sections read for Testing Tools audit. 1.8 manual; publisher jq-1.8.1 source compared. This is not live service testing or a full-publication certification.

  6. Market practice

    pytest exit codes ↗ — pytest project · Current stable read 7 November 2026, compared8.4.0 source — Actual current stable operative exit-code page includes0–6. Older8.4.0 tagged page has0–5; code6 too-many-warnings is version-scoped.

    Actual current stable operative exit-code page includes0–6. Older8.4.0 tagged page has0–5; code6 too-many-warnings is version-scoped. · Checked 2026-11-07

    Selected publisher sections read for Testing Tools audit. Current stable read 7 November 2026, compared8.4.0 source. This is not live service testing or a full-publication certification.

  7. Market practice

    npm scripts ↗ — npm · Version11 route, accessed7 November2026; npm-test11.21.2 route marked Legacy — Selected shell execution and nonzero script-aborts-process guidance; npm-test Description confirms configured scripts.test and ignore-scripts exceptions.

    Selected shell execution and nonzero script-aborts-process guidance; npm-test Description confirms configured scripts.test and ignore-scripts exceptions. · Checked 2026-11-07

    Selected publisher sections read for Testing Tools audit. Version11 route, accessed7 November2026; npm-test11.21.2 route marked Legacy. This is not live service testing or a full-publication certification.

  8. Market practice

    curl --silent option ↗ — curl project · curl 8.14.1 — Full option: suppress progress meter and curl error messages, but do not suppress requested response data.

    Full option: suppress progress meter and curl error messages, but do not suppress requested response data. · Checked 2026-11-07

    Full publisher option file read for the Testing Tools analysis before implementation. curl 8.14.1; no live external service tested.

  9. Market practice

    curl --show-error option ↗ — curl project · curl 8.14.1 — Full option: when used with --silent, show curl error messages on failure.

    Full option: when used with --silent, show curl error messages on failure. · Checked 2026-11-07

    Full publisher option file read for the Testing Tools analysis before implementation. curl 8.14.1; no live external service tested.

Learn this properly

START HEREA first test-run shell script, and curl with jq for an API checkWrite a small script that runs your tests and reports the result, then check an API from the terminal with curl and jq.Opens at L0 Explain simply · about 16 min

Related briefs