Creating Mock Servers with Postman
What Is a Mock Server?
A mock server returns example responses that match a collection's saved examples, allowing frontend or client teams to build and test against an API before the real backend exists.
Creating a Mock Server
From a collection, choose "Mock Collection," give the mock server a name, and Postman generates a unique URL that serves saved example responses for each request.
How Requests Are Matched
| Match Criteria | Description |
|---|---|
| URL path | Matches the request path to a saved example |
| HTTP method | Matches GET, POST, etc. |
| Headers (optional) | Can be used to match specific example variants |
Benefits of Mocking
Mock servers let teams work in parallel, since frontend developers don't need to wait for the backend to be fully built to start integration work.
Mock servers are one way to simulate an API - let's look more closely at simulating responses for testing and prototyping.
Ready to master Postman API Testing Course?
Join Uncodemy's hands-on training and build real-world API testing skills with expert mentors.