Bird
Raised Fist0
Postmantesting~20 mins

Flow creation in Postman - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Postman Flow Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Postman Flow Execution Order

In Postman Flow, which block executes immediately after the Request block completes successfully?

AThe <strong>Start</strong> block triggers the next block regardless of request success
BThe <strong>Delay</strong> block placed anywhere in the flow
CThe <strong>Condition</strong> block connected to the <strong>Request</strong> block
DThe <strong>Request</strong> block itself runs again automatically
Attempts:
2 left
💡 Hint

Think about what controls the flow after a request finishes.

❓ Predict Output
intermediate
2:00remaining
Output of a Postman Flow with Delay and Request Blocks

Consider a Postman Flow with a Start block connected to a Delay block set to 2000 ms, which then connects to a Request block that returns status 200. What is the expected behavior?

Postman
Start -> Delay(2000ms) -> Request(status 200)
AThe flow fails because Delay cannot be connected before Request
BThe flow waits 2 seconds, then sends the request and receives status 200
CThe request sends immediately without waiting, then the flow delays 2 seconds
DThe flow sends the request twice, once before and once after the delay
Attempts:
2 left
💡 Hint

Think about how Delay blocks pause the flow before continuing.

❓ assertion
advanced
2:00remaining
Correct Assertion for Response Status in Postman Flow

Which assertion correctly checks that a response status code is 201 in a Postman Flow Test block?

Apm.test('Status is 201', () => pm.response.to.have.status(201));
Bpm.expect(pm.response.status).toBe(201);
Cassert(pm.response.statusCode == 201);
Dpm.response.statusCode === 201 ? pass() : fail();
Attempts:
2 left
💡 Hint

Use the official Postman assertion syntax.

🔧 Debug
advanced
2:00remaining
Debugging a Postman Flow with a Condition Block

A Postman Flow has a Condition block checking if response.status === 200. The flow always takes the false path even when the response status is 200. What is the most likely cause?

AThe response object is undefined at the time of condition evaluation
BThe condition uses a single equals sign (<code>=</code>) instead of triple equals (<code>===</code>)
CThe condition block is not connected to the Request block
DThe flow does not support boolean conditions
Attempts:
2 left
💡 Hint

Check if the response data is available when the condition runs.

❓ framework
expert
3:00remaining
Best Practice for Reusing Request Blocks in Postman Flow

In a complex Postman Flow, you want to reuse the same Request block multiple times with different parameters. Which approach ensures maintainability and clarity?

AUse external scripts to call the API instead of Request blocks
BDuplicate the entire flow for each parameter set to avoid changing variables
CCreate multiple identical Request blocks with hardcoded parameters for each use
DUse a single Request block with variables for parameters and update variables before each use
Attempts:
2 left
💡 Hint

Think about how variables help avoid repetition and ease updates.

Practice

(1/5)
1. What is the main purpose of creating a flow in Postman?
easy
A. To automate API tests by chaining multiple requests
B. To write SQL queries inside Postman
C. To design user interfaces for APIs
D. To create database backups automatically

Solution

  1. Step 1: Understand flow creation in Postman

    Flow creation means linking API requests so they run one after another automatically.
  2. Step 2: Identify the purpose of chaining requests

    Chaining helps automate tests by passing data between requests and checking responses.
  3. Final Answer:

    To automate API tests by chaining multiple requests -> Option A
  4. Quick Check:

    Flow creation = automate chained API tests [OK]
Hint: Flows chain requests to automate tests quickly [OK]
Common Mistakes:
  • Confusing flow creation with UI design
  • Thinking flow creates database backups
  • Assuming flow writes SQL queries
2. Which Postman script section is used to pass data from one request to the next in a flow?
easy
A. Pre-request Script
B. Headers
C. Tests
D. Body

Solution

  1. Step 1: Identify where to save data after a request

    The Tests script runs after a request and can save response data to variables.
  2. Step 2: Understand data passing in flows

    Saved variables from Tests can be used in the next request's Pre-request Script or URL.
  3. Final Answer:

    Tests -> Option C
  4. Quick Check:

    Data passing happens in Tests script [OK]
Hint: Use Tests to save data for next request [OK]
Common Mistakes:
  • Using Body to pass data between requests
  • Confusing Pre-request Script as data saver
  • Trying to pass data via Headers
3. Consider this Postman Tests script snippet:
pm.environment.set('token', pm.response.json().access_token);
What will be the value of token after this runs if the response JSON is {"access_token": "abc123"}?
medium
A. undefined
B. "abc123"
C. pm.response.json()
D. null

Solution

  1. Step 1: Extract value from response JSON

    The code accesses the 'access_token' key from the JSON response, which is "abc123".
  2. Step 2: Store value in environment variable

    pm.environment.set saves "abc123" as the value of 'token'.
  3. Final Answer:

    "abc123" -> Option B
  4. Quick Check:

    token = "abc123" after set [OK]
Hint: pm.environment.set stores exact JSON key value [OK]
Common Mistakes:
  • Assuming token becomes undefined
  • Confusing the whole JSON with the value
  • Expecting null instead of actual token
4. You wrote this Pre-request Script to use a token saved in environment variables:
pm.request.headers.add({key: 'Authorization', value: 'Bearer ' + pm.environment.get('token')});
But the API returns 401 Unauthorized. What is the likely error?
medium
A. Bearer keyword should be lowercase 'bearer'
B. The header key should be lowercase 'authorization'
C. pm.request.headers.add is not valid syntax
D. The token variable is not set or is empty

Solution

  1. Step 1: Check if token variable exists

    If 'token' is missing or empty, the Authorization header will be invalid.
  2. Step 2: Verify header syntax and casing

    Header keys are case-insensitive, and 'Bearer' is case-sensitive but usually uppercase works fine.
  3. Step 3: Confirm method usage

    pm.request.headers.add is valid to add headers dynamically.
  4. Final Answer:

    The token variable is not set or is empty -> Option D
  5. Quick Check:

    Missing token causes 401 Unauthorized [OK]
Hint: Check if token variable is set before request [OK]
Common Mistakes:
  • Changing header key case unnecessarily
  • Lowercasing 'Bearer' keyword
  • Thinking pm.request.headers.add is invalid
5. You want to create a flow where the first request logs in and saves a token, and the second request uses that token in its header. Which steps correctly describe this flow setup?
hard
A. In first request Tests, save token to environment; in second request Pre-request Script, add Authorization header using saved token
B. In first request Body, save token; in second request Tests, add Authorization header
C. In first request Headers, save token; in second request Body, add Authorization header
D. In first request Pre-request Script, save token; in second request Tests, add Authorization header

Solution

  1. Step 1: Save token after login request

    Use Tests script in first request to extract token from response and save it to environment variables.
  2. Step 2: Use token before second request

    In second request's Pre-request Script, read the saved token and add it to the Authorization header.
  3. Final Answer:

    In first request Tests, save token to environment; in second request Pre-request Script, add Authorization header using saved token -> Option A
  4. Quick Check:

    Save token in Tests, use in Pre-request Script [OK]
Hint: Save token in Tests, use in Pre-request Script for next request [OK]
Common Mistakes:
  • Trying to save token in Body or Headers
  • Adding header in Tests instead of Pre-request Script
  • Saving token before request runs
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard