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 aconfig.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 and Create a mock.
Working with an AI coding agent? The Postman plugin can build and run mocks for you.
For current help, see the Postman docs, try the free Postman tools (no account needed), or join us on Discord.
Hello,
I’ve created a public mock server using Postman. I’ve created an example and an answer and it works but up to a point.
I have a Spring application in development running a scheduled task, on the first run it’s suppose to send 9 requests but I’ve tested many times and after the 6 request, that returns successfully and is recorded in the mock server history the server just stops and my application fails, showing the following timeout deadline error (deleted the mock server url for privacy):
org.springframework.web.client.ResourceAccessException: I/O error on POST request for "<<mock-server-url>>": Timeout deadline: 180000 MILLISECONDS, actual: 180011 MILLISECONDS
I’ve checked and my company has a much higher limit for mock server requests, it’s right on the Postman application and I’m nowhere near the limit, I’m also just sending 9 requests, which seems very low for any testing purposes.
I tries adding a delay up to 11 seconds between requests and it still fails always on the 7 call.
Can someone let me know whats happening?
Thanks!