Setting up mock servers in Postman
Now that you know a bit about mock servers, let’s look at how to set one up in Postman.
To get started, go to the Mock Servers option on the left navigation panel:
Figure 12.1: Mock Server
If you don’t see that option, you might need to configure your workspace sidebar to show it. You can do that by going to the Configure workspace sidebar menu option:
Figure 12.2: Configure workspace sidebar
You can then enable the mock server option and any other elements that you want to be visible in your workspace.
Creating a mock server is simple:
- Click on the Create Mock Server option.
You can either create a new collection or select an existing one. For now, just create a new one. In the last chapter, I showed you how to install a todo list application that you can use for testing. Let’s look at mocking one of its endpoints.
- Enter tasks for the path that you want to mock...