I have created a document called Postman Quick Reference Guide, which is practically a collection of things I often stumble upon while using Postman and need a quick answer to.
This is still kind of work in progress, but inside you will find:
Cheatsheet with most important methods for writing scripts and tests
Simple solutions to common problems
Request creation
Assertions
Workflows
Newman
You can **download this for F R E E ** (no email / registration clickbait) by clicking the image below:
PLEASE let me know what you think about the Postman Quick Reference Guide, if and how it helps you be more productive and efficient while using Postman.
If there is anything missing or if you have any suggestions on how to improve it, just let me know.
Wanted to chime in on one bit. There are indeed super-local variables like var variableName = variableValue; that can be used within the script where it’s declared.
There’s also local variables with setters and getters available only via the pm.* API:
pm.variables.set("variableName", variableValue);
pm.variables.get("variableName"); // can also be used to get other variable types
These local variables can be used to save state within the same request (e.g. pre-request to test script) and also throughout the same collection run. That means that you can use a local variable to save state throughout a collection run without doing any teardown / clearing / unsetting at the end, and you don’t have to worry about polluting any namespaces.
The official Postman documentation about this is not very clear. We are working on this, as well as other stuff about variables in general.
Wonderful! It is really helpful to have this type of manual. I appreciate it a lot. With your permission, I will promote it in my area https://populationstat.com/canada/vancouverand among my friends. I hope you have nothing against this idea. And once again, many thanks for your assistance with this matter. I believe everybody agrees with me here.