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.
- Book
- Count
- Stranger
HOW THE PICTURE MAPS
| In the picture | In the software |
|---|---|
| The guest book | The request journal |
| Counting visitors to one room | The call count |
| A visitor for a room that is missing | An unmatched call |
| A clerk pointing to the closest room | A 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
- Implementation-specific
Verifying requests (WireMock documentation) ↗ — WireMock · Current verifying: retained request journal, POST count, request matching and ranked near misses; opened6 November2026.
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.
- Implementation-specific
Running as a standalone process (WireMock documentation) ↗ — WireMock · Current standalone options: journal disable/cap and oldest-entry eviction; opened6 November2026.
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.