Pre-response Script for Mock Servers

Hi all,

Just like there are a Pre-request Script for requests, is there a Pre-Response Script (or something similar) for Mock Servers responses?

I can see the benefits of it on at least two use cases.
Great for simple/dummy validation or kind-of validations (like ID must not be 0, etc.)
and to set Dynamic Variables which is not covered by the default Postman Dynamic Variables

Hi @ebrockdorff and welcome here! :smiley:

You can use the Tests scripts for that, they’ll execute after the request is executed. You can learn more about it in the Tests scripts section of the Learning Center.

If this isn’t what you were looking for can you detail your question a bit more? What are you trying to achieve that Tests do not allow you to do?