Skip to main content
MockServer includes a browser-based dashboard for inspecting its internal state. The UI is read-only — use the REST API or a client SDK to create or modify expectations.

Open the dashboard

Navigate to the dashboard in any browser:
http://localhost:1080/mockserver/dashboard
Replace localhost:1080 with the host and port where your MockServer is running. You can also open the UI programmatically from Java using MockServerClient or ClientAndServer:
mockServerClient.openUI();
The openUI() method pauses for one second after launching the browser to give the UI time to load before MockServer shuts down. Use openUI(TimeUnit timeUnit, long pause) to customize the pause duration.
If you set logLevel to DEBUG and enable mockserver.launchUIForLogLevelDebug=true, MockServer will open the dashboard automatically each time a ClientAndServer instance starts. This is useful when debugging multiple concurrent MockServer instances.

Dashboard sections

Logs

The Logs section shows all events recorded by MockServer, including:
  • Incoming requests received
  • Expectation matches and failures
  • Expectations created and deleted
  • Errors and exceptions
All log events for a single incoming request are grouped together, making it easy to trace how MockServer handled it end to end. When an expectation is not matched, MockServer shows a because block explaining which fields did or did not match. Expand it to see the full comparison between the incoming request and the expectation matcher. At DEBUG log level, the because block includes a detailed human-readable reason for each non-matching field. Additionally at DEBUG level, clearing state does not remove log events from the display — they are marked as deleted but remain visible so you can continue debugging.

Active expectations

The Active Expectations section lists all current expectations in the order they are evaluated. The display takes into account:
  • The order expectations were created
  • Each expectation’s priority
  • Time-to-live (timeToLive) for expiring expectations
  • Remaining matches count (times)
Use this section to confirm that your expectations were registered correctly and are in the expected evaluation order.

Received requests

The Received Requests section shows every request MockServer received, in the order they arrived. This includes:
  • Requests matched against an expectation
  • Requests proxied to a backend
  • Requests that were neither matched nor proxied (resulting in a 404)

Proxied requests

The Proxied Requests section shows requests that MockServer forwarded to a backend, along with the corresponding response returned.

Troubleshooting with the UI

Use the following workflow when an expectation is not matching as expected:
1

Set log level to DEBUG

Set mockserver.logLevel=DEBUG before running your test. This enables detailed match failure output in the Logs section.
2

Open the dashboard

Navigate to http://localhost:1080/mockserver/dashboard in your browser.
3

Send the request

Trigger the request from your application or test.
4

Inspect the Logs section

Find the log group for your request. Look for an EXPECTATION_NOT_MATCHED event and expand its because block. MockServer will show you exactly which fields did not match and why — for example, a header value mismatch or a path pattern that did not apply.
5

Check Active Expectations

Confirm your expectation is listed and that its matcher looks correct. If it is absent, the expectation may have expired or been cleared.
The UI is available for all deployment modes except the deployable WAR. It is not available when MockServer is deployed as a servlet inside an existing servlet container.