0
0
Postmantesting~20 mins

Mock server limitations in Postman - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Mock Server Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Mock Server Response Delays

Which of the following is a true limitation of Postman mock servers regarding response delays?

AMock servers can simulate delays but only up to a maximum of 10 seconds per response.
BMock servers can simulate any response delay precisely as configured in the mock settings.
CMock servers always respond instantly and cannot simulate network latency or delays.
DMock servers simulate delays randomly without any configuration option.
Attempts:
2 left
💡 Hint

Think about whether Postman mock servers can mimic slow network responses by default.

🧠 Conceptual
intermediate
2:00remaining
Mock Server Data Persistence

What is a key limitation of Postman mock servers related to data persistence?

AMock servers store all request data permanently and can be queried later for history.
BMock servers do not store any request or response data; each request is stateless and independent.
CMock servers store request data only for 24 hours before automatic deletion.
DMock servers store request data but only for requests with specific headers.
Attempts:
2 left
💡 Hint

Consider if mock servers keep track of previous requests or responses.

Predict Output
advanced
2:00remaining
Mock Server Response Matching Behavior

Given these two mock responses configured in Postman for the same endpoint but different query parameters, what response will the mock server return when called with ?type=admin?

Postman
1. Response A: matches requests with query param type=admin, returns status 200 with body {"role": "admin"}
2. Response B: matches requests with query param type=user, returns status 200 with body {"role": "user"}
AReturns status 200 with body {"role": "admin"}
BReturns status 200 with body {"role": "user"}
CReturns status 404 Not Found because query param type=admin is not supported
DReturns status 500 Internal Server Error due to ambiguous matching
Attempts:
2 left
💡 Hint

Think about how Postman mock servers match requests to responses based on query parameters.

assertion
advanced
2:00remaining
Assertion on Mock Server Response Headers

You want to write a test in Postman to assert that the mock server response includes the header Content-Type: application/json. Which assertion code snippet is correct?

Postman
pm.test("Content-Type is application/json", () => {
    // Your assertion here
});
Apm.expect(pm.response.headers.contentType).to.eql('application/json');
Bpm.expect(pm.response.headers['Content-Type']).to.equal('application/json');
Cpm.expect(pm.response.headers.getContentType()).to.equal('application/json');
Dpm.expect(pm.response.headers.get('Content-Type')).to.eql('application/json');
Attempts:
2 left
💡 Hint

Check the Postman API for how to get header values from the response.

framework
expert
2:00remaining
Limitations of Mock Server for Testing Authentication Flows

Which statement best describes a limitation of Postman mock servers when testing authentication flows that require dynamic token generation and validation?

AMock servers cannot execute server-side logic like token generation or validation; they only return static responses.
BMock servers can dynamically generate and validate tokens using pre-request scripts and environment variables.
CMock servers support OAuth2 token validation automatically without additional configuration.
DMock servers can simulate token expiration by setting response delays and status codes dynamically.
Attempts:
2 left
💡 Hint

Consider whether mock servers can run code or logic on the server side.