A. Missing closing parenthesis in pm.expect statement
B. Incorrect header name used
C. pm.response.headers.has is not a function
D. pm.test requires a callback function
Solution
Step 1: Check syntax of pm.expect statement
The pm.expect call is missing a closing parenthesis after .to.equal(true).
Step 2: Verify other parts
Header name and pm.response.headers.has function are correct, and pm.test has a callback function.
Final Answer:
Missing closing parenthesis in pm.expect statement -> Option A
Quick Check:
Syntax error = Missing parenthesis [OK]
Hint: Count parentheses carefully in assertions [OK]
Common Mistakes:
Assuming wrong header name
Thinking pm.response.headers.has doesn't exist
Ignoring missing parenthesis
5. You want to use Postman to check API stability by running a test multiple times and measuring if response times stay below 300ms consistently. Which approach best fits this non-functional testing goal?
hard
A. Manually send one request and check response time once
B. Use Postman Collection Runner to run the test repeatedly and write a test script to assert responseTime < 300ms each time
C. Write a test that only checks if status code is 200
D. Use Postman to test only API functionality, not response times
Solution
Step 1: Understand stability testing requirements
Stability means consistent performance over multiple runs, so repeated tests are needed.
Step 2: Choose Postman feature and test script
Collection Runner allows running tests multiple times; writing a script to check responseTime < 300ms each time fits the goal.
Final Answer:
Use Postman Collection Runner to run the test repeatedly and write a test script to assert responseTime < 300ms each time -> Option B
Quick Check:
Repeated tests + response time check = Use Postman Collection Runner to run the test repeatedly and write a test script to assert responseTime < 300ms each time [OK]
Hint: Use Collection Runner for repeated tests [OK]
Common Mistakes:
Testing only once for stability
Ignoring response time in tests
Confusing functional with non-functional testing
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.