Setting up a mock server
There are a couple of different ways in which you can create mock servers in Postman. In this section, I will show you how to set one up that is based on a specification file. This will be the primary use case that I cover in this chapter, but I will also make sure that you understand some of the other ways that you create mock servers as well.
Creating a mock server from a specification file
In the previous chapter, I walked you through how to set up an API specification for a to-do list API. You may want to go back to that chapter and see how that was done, or you can download the specification from the GitHub repository (https://github.com/PacktPublishing/API-Testing-and-Development-with-Postman) for this book and import it into Postman as a starting point. If you do create the API from the imported OpenAPI definition file, ensure that the Generate collection from imported APIs option is selected and set the Link this collection as option to Test...