Software Testing / Learning brief

Tom writes his first JUnit 5 tests for the title cleaner

What this means in plain language

Tom writes a test, a set-up method and an expected-error check in JUnit 5.

Understand the full idea, step by step

Analogy: an exam paper with a marking scheme. Each question has the correct answer on the scheme. The marker compares and writes a note when it differs. A fresh desk is set before each question.

The questions are test methods, the scheme is the assertions and the fresh desk is set-up.

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.

Hands-on steps for this tool. The people and the app are invented.

What this brief simplifies: Selected primary passages actually read 7 November 2026; Selenium/version limits stated in lesson. Daily List, rules and observations are synthetic, not an executed live-app test.

Sources for this brief — 7 sources
  1. Implementation-specific

    JUnit 5.14.4 overview ↗ — JUnit team · Platform/Jupiter/Vintage roles; supported Java versions; selected release, not latest (selected actual primary passages read 7 November 2026; named JUnit5.14.4 or Surefire3.6.1 scope, not latest-version certification).

    Platform/Jupiter/Vintage roles; supported Java versions; selected release, not latest. Selected product/release guidance; not a universal project or employer policy. · Checked 2026-11-07

    Actual selected primary sections read. The active guide header selects5.14.4; version-picker entries and newer-version notice are not its version. CSV introductory prose discrepancy is explained against attribute semantics/default and concrete false example. Synthetic helper/data examples do not claim application validation. Isolated runtime tests, if reported, do not certify Maven or every JVM.

  2. Implementation-specific

    JUnit 5.14.4 dependency metadata ↗ — JUnit team · Version alignment and BOM; Platform1.14.4 standalone; Jupiter5.14.4 aggregator/API/params/engine (selected actual primary passages read 7 November 2026; named JUnit5.14.4 or Surefire3.6.1 scope, not latest-version certification).

    Version alignment and BOM; Platform1.14.4 standalone; Jupiter5.14.4 aggregator/API/params/engine. Selected product/release guidance; not a universal project or employer policy. · Checked 2026-11-07

    Actual selected primary sections read. The active guide header selects5.14.4; version-picker entries and newer-version notice are not its version. CSV introductory prose discrepancy is explained against attribute semantics/default and concrete false example. Synthetic helper/data examples do not claim application validation. Isolated runtime tests, if reported, do not certify Maven or every JVM.

  3. Implementation-specific

    JUnit 5.14.4 annotations ↗ — JUnit team · Jupiter test and lifecycle annotation roles (selected actual primary passages read 7 November 2026; named JUnit5.14.4 or Surefire3.6.1 scope, not latest-version certification).

    Jupiter test and lifecycle annotation roles. Selected product/release guidance; not a universal project or employer policy. · Checked 2026-11-07

    Actual selected primary sections read. The active guide header selects5.14.4; version-picker entries and newer-version notice are not its version. CSV introductory prose discrepancy is explained against attribute semantics/default and concrete false example. Synthetic helper/data examples do not claim application validation. Isolated runtime tests, if reported, do not certify Maven or every JVM.

  4. Implementation-specific

    JUnit 5.14.4 assertions ↗ — JUnit team · Expected/actual equality and assertion behavior (selected actual primary passages read 7 November 2026; named JUnit5.14.4 or Surefire3.6.1 scope, not latest-version certification).

    Expected/actual equality and assertion behavior. Selected product/release guidance; not a universal project or employer policy. · Checked 2026-11-07

    Actual selected primary sections read. The active guide header selects5.14.4; version-picker entries and newer-version notice are not its version. CSV introductory prose discrepancy is explained against attribute semantics/default and concrete false example. Synthetic helper/data examples do not claim application validation. Isolated runtime tests, if reported, do not certify Maven or every JVM.

  5. Implementation-specific

    JUnit 5.14.4 exception handling ↗ — JUnit team · Unexpected exceptions; throws clause versus an exception oracle; subtype versus exact assertions (selected actual primary passages read 7 November 2026; named JUnit5.14.4 or Surefire3.6.1 scope, not latest-version certification).

    Unexpected exceptions; throws clause versus an exception oracle; subtype versus exact assertions. Selected product/release guidance; not a universal project or employer policy. · Checked 2026-11-07

    Actual selected primary sections read. The active guide header selects5.14.4; version-picker entries and newer-version notice are not its version. CSV introductory prose discrepancy is explained against attribute semantics/default and concrete false example. Synthetic helper/data examples do not claim application validation. Isolated runtime tests, if reported, do not certify Maven or every JVM.

  6. Implementation-specific

    Maven Surefire 3.6.1 JUnit Platform guide ↗ — Apache Software Foundation (Maven Surefire) · Platform/engine configuration and plugin role; no local Maven integration claim (selected actual primary passages read 7 November 2026; named JUnit5.14.4 or Surefire3.6.1 scope, not latest-version certification).

    Platform/engine configuration and plugin role; no local Maven integration claim. Selected product/release guidance; not a universal project or employer policy. · Checked 2026-11-07

    Actual selected primary sections read. The active guide header selects5.14.4; version-picker entries and newer-version notice are not its version. CSV introductory prose discrepancy is explained against attribute semantics/default and concrete false example. Synthetic helper/data examples do not claim application validation. Isolated runtime tests, if reported, do not certify Maven or every JVM.

  7. Simplified educational illustration

    Payments Signal editorial teaching models — Payments Signal · Synthetic Daily List rule and observations stated in the lesson; not a publisher application fact or an executed live-app result.

    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 HEREJUnit 5 from zero: first tests, set-up methods and assertionsWrite a first JUnit 5 test in Java, learn the few annotations that matter, use assertions that show clear messages, and check that a call fails in the right way.Opens at L0 Explain simply · about 16 min

Related briefs