TOPIC 17/1716 MINNOT STARTED

WireMock part 3: check what the app sent and read the request journal

Ask WireMock what was called, count the calls, and find the calls that no stub matched, so you test what your app sent and not only what it received.

L1–L4 are part of the Pro pass

L0 Explain simply

Analogy: a hotel guest book. Every visitor signs in. You can read the book, count who came to one room, and find people who asked for a room that does not exist.

Leo is testing Daily List, a to-do list app. He checks the book after each test. Tom clears the book before the next run so old names do not confuse the count.

What it is: This is still WireMock, the tool that pretends to be an HTTP (Hypertext Transfer Protocol) service on your machine. The is a memory of the calls received since the last reset. It is not a file that survives a restart. A asks how many of those calls matched a pattern. You POST the pattern to /__admin/requests/count and read the number. A WireMock unmatched call is a call no stub answered, so WireMock sent 404. A near miss pairs that call with the stub that came closest. The journal checks what your app sent. A stub that always answers 200 cannot tell you that the app sent the call twice.

Why it matters: A happy stub hides a double send and a typo in the path. Leo who reads the journal and checks the count finds bugs that the answer body would never show. If the journal is switched off, there is nothing to check.

PLAIN WORDS · 3 in this section
hypertext
text that links to other pages
stub
a simple fake part that gives fixed answers
typo
a small mistake made when typing

PICTURE IT

The picture is the one the lesson above opens with. The table below shows how each part of it matches the software.

THE REAL JOB Count and inspect a request pattern.

  1. Book
  2. Count
  3. Stranger
Guest book

HOW THE PICTURE MAPS

How each part of the picture matches the software
In the pictureIn the software
The guest bookThe request journal
Counting visitors to one roomThe call count
A visitor for a room that is missingAn unmatched call
A clerk pointing to the closest roomA near miss

WHERE THIS PICTURE STOPS

  • A book lasts for years, but the journal is lost when the server stops.
  • A clerk may guess, but a near miss shows a real difference.
  • A book has many pages, but a journal can be capped.

HOOK

Sign in, count, find strangers.

TELL A FRIEND

A book, a count and a stranger.

OFTEN MIXED UP WITH WireMock part 1: run it and write a first stub. That topic makes a stub answer a call. This one asks which calls arrived, how many, and which found no stub.

PRACTISE AND KEEP

Sources for this topic — 2 sources
  1. Implementation-specific

    Verifying requests (WireMock documentation) ↗ — WireMock · Current verifying: retained request journal, POST count, request matching and ranked near misses; opened6 November2026.

    The WireMock verifying pages describe a journal of received requests. The admin address lists them and counts matches. Unmatched requests and near misses can be listed. A delete call clears the journal. · Checked 2026-11-08

    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. V27 supplement, 6 November 2026: relevant primary page sections actually opened; implementation-specific current product guidance, not universal standard. See full V27 audit for version and access scope.

    WireMock topic review, 8 November 2026: Request journal, counts, unmatched requests, near misses and resetting the journal. Current official page opened 8 November 2026.

  2. Implementation-specific

    Running as a standalone process (WireMock documentation) ↗ — WireMock · Current standalone options: journal disable/cap and oldest-entry eviction; opened6 November2026.

    The WireMock standalone pages say the request journal can be switched off with a start-up flag and that the number of entries can be capped. Once the cap is reached, the oldest entries are dropped. · Checked 2026-11-08

    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. V27 supplement, 6 November 2026: relevant primary page sections actually opened; implementation-specific current product guidance, not universal standard. See full V27 audit for version and access scope.

    WireMock topic review, 8 November 2026: Command-line options: bind address, no-request-journal and max-request-journal-entries. Current official page opened 8 November 2026.

Deepest material on this page: L4 — Standards & sources. Where a topic stops short of implementation depth, that is a deliberate coverage decision, not an oversight — see coverage.