Skip to content
ploiu edited this page Aug 5, 2021 · 7 revisions

The GUI is the simplest way of using the mock server, and can be generated with mockServer --load-ui. This will generate the ui files in your current directory and can be navigated to in the url provided by the program. By default, this url will be http://localhost:8000/mock-server-ui.

First Load

Upon loading for the first time, you will see a UI that looks like this (note that I am not a web designer, so please excuse the bad style): initial page

Editing

On the left is a sidebar that lists all the mock routes you have set up, as long as a save button to save all your routes, and a new button to create a new route. Clicking on the add new button will show a screen like this: blank add new screen

Once you've edited the route and are happy with it, be sure to click the save button at the top of the route list sidebar. If everything saved successfully, you should see a message stating so: save message

Note that the save button saves all routes, not just the current one.

Route Log

There is also a view to see which routes are hit and when, along with the request headers and body. To get to it, click on the "View Route Log" button at the top of the screen and this view should show up: empty route log

Whenever the mock server is hit by a request, it will send an event to the browser to display the request: route log with a request

Each request is a slide out that when clicked, will show 2 more slideouts - one for request headers and another for request body: selected request shows slide outs for header and body

You can click on either slide out to show its contents: open request headers

Clone this wiki locally