0
0
Postmantesting~20 mins

Pretty, raw, and preview views in Postman - Practice Problems & Coding Challenges

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

In Postman, when you receive a response, you can view it in different tabs: Pretty, Raw, and Preview. Which statement correctly describes the Pretty view?

AIt displays the response exactly as received, including all headers and raw bytes.
BIt only shows the HTTP status code and response time without the body content.
CIt renders the response as a live webpage, executing any scripts or styles included.
DIt shows the response formatted with syntax highlighting and indentation for easier reading.
Attempts:
2 left
💡 Hint

Think about which view helps you read JSON or XML responses clearly.

Predict Output
intermediate
2:00remaining
Output of Raw View for JSON Response

You send a GET request that returns this JSON response body:

{"name":"Alice","age":30,"city":"Paris"}

What will the Raw view display?

A<html><body>{"name":"Alice","age":30,"city":"Paris"}</body></html>
B
{
  "name": "Alice",
  "age": 30,
  "city": "Paris"
}
C{"name":"Alice","age":30,"city":"Paris"}
DName: Alice, Age: 30, City: Paris
Attempts:
2 left
💡 Hint

The Raw view shows the exact response text without formatting.

assertion
advanced
2:00remaining
Validating Preview View Behavior

You receive an HTTP response with Content-Type text/html containing a simple webpage. Which assertion correctly verifies that the Preview tab in Postman will render the page?

AAssert that the response body is valid JSON format.
BAssert that the response body contains valid HTML tags like <code>&lt;html&gt;</code> and <code>&lt;body&gt;</code>.
CAssert that the response headers include <code>Content-Type: application/json</code>.
DAssert that the response body is empty.
Attempts:
2 left
💡 Hint

Preview renders HTML content visually.

🔧 Debug
advanced
2:00remaining
Troubleshooting Raw View Showing Unexpected Content

You notice that in Postman, the Raw view of a response shows garbled characters instead of readable text. What is the most likely cause?

AThe response is compressed (e.g., gzip) but Postman did not decompress it.
BThe request method was POST instead of GET.
CThe Pretty view is enabled, causing Raw view to change output.
DThe response body is empty, so Postman shows random characters.
Attempts:
2 left
💡 Hint

Think about how servers send compressed data and how clients handle it.

framework
expert
3:00remaining
Automating Validation of Pretty View Formatting

You want to write a Postman test script that automatically checks if the response body is valid JSON and thus will display correctly in the Pretty view. Which script snippet correctly performs this check?

Postman
pm.test('Response is valid JSON', () => {
  // Your code here
});
A
pm.test('Response is valid JSON', () =&gt; {
  pm.expect(() =&gt; JSON.parse(pm.response.text())).not.to.throw();
});
B
pm.test('Response is valid JSON', () =&gt; {
  pm.expect(pm.response.text()).to.be.json;
});
C
pm.test('Response is valid JSON', () =&gt; {
  pm.expect(pm.response.json()).to.be.a('string');
});
D
pm.test('Response is valid JSON', () =&gt; {
  pm.expect(pm.response.code).to.equal(200);
});
Attempts:
2 left
💡 Hint

Try parsing the response text and check if it throws an error.