# Postman Blog | End-to-end testing best practices with Postman mock servers

**URL:** <https://community.postman.com/t/postman-blog-end-to-end-testing-best-practices-with-postman-mock-servers/50618>\
**Category:** Help Hub\
**Tags:** tests, mockservers, blog\
**Created:** [August 16, 2023, 9:30am UTC](https://community.postman.com/t/postman-blog-end-to-end-testing-best-practices-with-postman-mock-servers/50618 "2023-08-16T09:30:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [August 16, 2023, 9:30am UTC](https://community.postman.com/t/postman-blog-end-to-end-testing-best-practices-with-postman-mock-servers/50618/1 "2023-08-16T09:30:24Z")

</div>

> **Archived topic — some details may be out of date.**  
> Mock servers built from saved collection examples are still supported. Postman now also has **code-based mocks** : JavaScript request handlers plus a `config.yaml`, stored as files in your Git repository, which you can run locally or deploy. Create one in the app, or use the Postman CLI to generate one from an OpenAPI spec, collection or dataset (`postman mock generate`) and run it (`postman mock run`). See [About mocks](https://learning.postman.com/docs/design-apis/mock-apis/mocks/overview) and [Create a mock](https://learning.postman.com/docs/design-apis/mock-apis/mocks/create-a-mock).  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) can build and run mocks for you.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

This article from [David Espi Hernandez](https://www.linkedin.com/in/david-esp%C3%AD-hern%C3%A1ndez-63769183/), discusses the importance of E2E testing, challenges with external dependencies, and how Postman’s mock servers can be used to facilitate E2E testing by simulating API behavior.

It provides a detailed guide on setting up mock servers and structuring E2E test collections, using the Postman API for automation.

> **[End-to-end testing best practices with Postman mock servers](https://blog.postman.com/end-to-end-testing-best-practices-postman-mock-servers/)**
>
> Automate your testing processes. Learn how to use Postman to set up a mock server so it returns what you need for your end-to-end testing.

Feel free to explore the fantastic array of content on our [blog](https://blog.postman.com)! :postman:

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [December 11, 2024, 4:05pm UTC](https://community.postman.com/t/postman-blog-end-to-end-testing-best-practices-with-postman-mock-servers/50618/2 "2024-12-11T16:05:05Z")

</div>

Closed on December 11, 2024, 4:05pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
