Mock Servers - transparency?

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 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’m new to Postman and Mock Servers, so apologies if this is a stupid question. But I was wondering if there was some way to see what’s going on with a Mock Server?

For example, I’d like to see how many requests it’s received in the last 5 minutes? Or maybe actually see what the content of the requests are and the responses returned.

As far as I can tell, neither Monitors or the Console work with Mock Servers. Is that true?

thanks!

Hey @irwina,

Just curious, what is your use case for this information? There might be some other way to get to what you want.

Sure! It’s pretty basic really. I just want some kind of confirmation that it’s working other than a 200 status code and later (though not necessary now) I may want to see the actual request received along with the response.

Maybe my expectations are wrong, I’m just used to seeing all this information in tools like soapUI with their mock server.

Unfortunately, I don’t think that is something you can do. I think of mock servers more like a mock library where you are using it to simply return a response.

I know this probably won’t be what you want, but you can always click on the history tab in Postman to view the requests you’ve sent. But I’m guessing you are asking for the metrics for all users hitting the mock server.
image