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?
✗ Incorrect
The Collection Pre-request script runs first, before folder and request Pre-request scripts.
After a request is sent and response received, which script runs immediately next?
✗ Incorrect
The Request Test script runs immediately after the response is received.
If you want to set a variable before any request runs in a collection, where should you put the script?
✗ Incorrect
Collection Pre-request scripts run before any requests, so they are ideal for setting variables globally.
Which script can update variables for use in later requests during a collection run?
✗ Incorrect
Both Pre-request and Test scripts can set or update variables that affect later requests.
What is the correct order of Test scripts execution after a request?
✗ Incorrect
Test scripts run in this order: Request Test script, then Folder Test script, then Collection Test script.
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.