Postman MCQ’s with Answers & Explanations total-qa June 15, 2025 August 1, 2025 No Comments on Postman MCQ’s with Answers & Explanations 1. What is Postman primarily used for? Designing websites Managing databases Testing APIs Writing Java code Explanation: Postman is widely used to send HTTP requests and test RESTful APIs. 2. Which HTTP method is used in Postman to retrieve data? POST PUT GET DELETE Explanation: GET is used to fetch data from a server. 3. What does status code 404 indicate in Postman? Success Unauthorized Resource not found Server error Explanation: HTTP 404 means the resource or endpoint was not found on the server. 4. Which content type is typically used to send JSON data in the body of a POST request? text/plain application/xml application/json application/html Explanation: This MIME type tells the server the body is in JSON format. 5. How can you save dynamic data from a response in Postman? Using Headers Use pm.response.json() to parse the response and pm.environment.set() to store data in an environment variable. application/json application/html Explanation: Use pm.response.json() to parse the response and pm.environment.set() to store data in an environment variable. let data = pm.response.json(); pm.environment.set("userId", data.user.id); 6. Which of the following is used to write tests in Postman? Python Ruby JavaScript Bash Explanation: Postman uses JavaScript in the Tests and Pre-request Script sections to write test assertions, parse responses, and set variables. 7. How can you chain requests in Postman (i.e., use response of one in another)? Using hardcoded values Using local storage Using environment or global variables Not possible Explanation: To chain requests, you can save values from a response to an environment/global variable and use it in another request. 8. What does the 200 HTTP status code mean in Postman? Bad Request OK – Successful Response Not Found Unauthorized Explanation: 200 means the request was successfully received, understood, and processed by the server. 9. Which of the following is a correct way to set an environment variable from a test script? env.set(“token”, value); pm.environment.set(“token”, value); postman.setEnv(“token”, value); pm.setEnvVariable(“token”, value); Explanation: pm.environment.set() is the modern and correct syntax for setting environment variables in Postman test scripts. 10. What is the purpose of using Newman with Postman? To run GUI-based API tests To generate database schemas To run Postman collections via CLI To visualize response data Explanation: Newman is Postman’s command-line companion tool, used to run collections as part of CI/CD pipelines or terminal-based testing. Loading …