0
0
Postmantesting~5 mins

Script execution order in Postman - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are the main types of scripts in Postman that control the execution order?
Pre-request scripts and Test scripts. Pre-request scripts run before the request is sent. Test scripts run after the response is received.
Click to reveal answer
intermediate
In what order do Postman scripts execute when running a collection?
First, the Pre-request script of the collection runs, then the Pre-request script of the folder (if any), then the Pre-request script of the request. After the request is sent and response received, the Test script of the request runs, then the Test script of the folder, then the Test script of the collection.
Click to reveal answer
beginner
Why is understanding script execution order important in Postman?
Because it helps you organize setup and cleanup tasks properly. For example, setting environment variables before a request or validating responses after. It ensures scripts run at the right time for reliable tests.
Click to reveal answer
intermediate
What happens if you set a variable in a Pre-request script at the collection level and then overwrite it in the request Pre-request script?
The variable set in the request Pre-request script will overwrite the collection level variable for that request execution, because request scripts run after collection scripts.
Click to reveal answer
intermediate
Can Test scripts modify variables that affect subsequent requests in the same collection run?
Yes. Test scripts can set or update variables that will be used by later requests in the collection run, allowing dynamic data flow between requests.
Click to reveal answer
Which script runs first when executing a request in Postman?
ACollection Pre-request script
BRequest Test script
CRequest Pre-request script
DFolder Test script
After a request is sent and response received, which script runs immediately next?
ARequest Pre-request script
BRequest Test script
CCollection Test script
DFolder Pre-request script
If you want to set a variable before any request runs in a collection, where should you put the script?
ACollection Pre-request script
BRequest Test script
CFolder Test script
DRequest Pre-request script
Which script can update variables for use in later requests during a collection run?
APre-request scripts only
BNeither
CTest scripts only
DBoth Pre-request and Test scripts
What is the correct order of Test scripts execution after a request?
AFolder, Request, Collection
BCollection, Folder, Request
CRequest, Folder, Collection
DRequest, Collection, Folder
Explain the order in which Pre-request and Test scripts run in Postman when executing a collection.
Think about scripts running from broadest scope to narrowest before the request, then from narrowest to broadest after.
You got /7 concepts.
    Describe how variable setting in different script levels affects their values during a collection run.
    Consider the script execution order and scope hierarchy.
    You got /4 concepts.