Bird
Raised Fist0
Postmantesting~15 mins

Description formatting (Markdown) in Postman - Build an Automation Script

Choose your learning style10 modes available
Verify Markdown formatting in Postman request description
Preconditions (2)
Step 1: Open the request in Postman
Step 2: Click on the 'Description' tab below the request URL field
Step 3: Enter the following Markdown text in the description field:
Step 4: # Heading 1
Step 5: ## Heading 2
Step 6: **Bold Text**
Step 7: *Italic Text*
Step 8: - List item 1
Step 9: - List item 2
Step 10: [Link](https://www.postman.com)
Step 11: Switch to the 'Preview' tab to view the rendered Markdown
Step 12: Verify that the description renders the Markdown correctly
✅ Expected Result: The description preview shows a Heading 1, Heading 2, bold text, italic text, a bulleted list with two items, and a clickable link to https://www.postman.com
Automation Requirements - Postman Test Scripts
Assertions Needed:
Verify description field contains the exact Markdown text
Verify the rendered preview matches expected Markdown formatting (headings, bold, italic, list, link)
Best Practices:
Use Postman scripting API to access request description
Validate raw description text and rendered HTML output if accessible
Keep test scripts simple and maintainable
Automated Solution
Postman
pm.test('Description contains correct Markdown', () => {
    const description = pm.request.description.toString();
    pm.expect(description).to.include('# Heading 1');
    pm.expect(description).to.include('## Heading 2');
    pm.expect(description).to.include('**Bold Text**');
    pm.expect(description).to.include('*Italic Text*');
    pm.expect(description).to.include('- List item 1');
    pm.expect(description).to.include('- List item 2');
    pm.expect(description).to.include('[Link](https://www.postman.com)');
});

// Note: Postman test scripts cannot directly verify rendered preview HTML,
// so manual verification or external tools are needed for full rendering check.

This test script checks that the request description contains the exact Markdown text entered. It uses pm.request.description.toString() to get the raw description text. Then it asserts that all Markdown elements like headings, bold, italic, list items, and link syntax are present as expected.

Since Postman test scripts cannot access the rendered HTML preview of the description, this script focuses on verifying the raw Markdown content. Manual verification of the rendered preview is recommended to ensure correct formatting.

Common Mistakes - 3 Pitfalls
Trying to assert rendered Markdown preview using Postman test scripts
Using incorrect property to access description (e.g., pm.request.description.value)
Not escaping special characters in Markdown when asserting
Bonus Challenge

Add tests to verify description formatting for multiple requests with different Markdown content

Show Hint

Practice

(1/5)
1. What is the main purpose of using Markdown in Postman descriptions?
easy
A. To store environment variables
B. To make descriptions neat and easy to read
C. To change the API request method
D. To write code that runs tests automatically

Solution

  1. Step 1: Understand Markdown's role in Postman

    Markdown is used to format text, making it clear and organized.
  2. Step 2: Identify the purpose of descriptions

    Descriptions help explain tests and requests clearly to the team.
  3. Final Answer:

    To make descriptions neat and easy to read -> Option B
  4. Quick Check:

    Markdown = format text [OK]
Hint: Markdown formats text for clarity [OK]
Common Mistakes:
  • Confusing Markdown with test automation
  • Thinking Markdown changes API methods
  • Assuming Markdown stores variables
2. Which of the following is the correct way to make text bold in a Postman description using Markdown?
easy
A. *bold text*
B. _bold text_
C. `bold text`
D. **bold text**

Solution

  1. Step 1: Recall Markdown syntax for bold text

    Bold text is created by wrapping text with double asterisks ** like **bold**.
  2. Step 2: Compare options

    **bold text** uses **bold text**, which is correct. *bold text* or _bold text_ use single * or _, which make italics. `bold text` uses backticks for code formatting.
  3. Final Answer:

    **bold text** -> Option D
  4. Quick Check:

    Bold = **text** [OK]
Hint: Use double asterisks for bold text [OK]
Common Mistakes:
  • Using single asterisk for bold (makes italics)
  • Using backticks instead of asterisks
  • Confusing italics and bold syntax
3. Given this Postman description snippet using Markdown:
### Test Steps
1. Send request
2. Check response
- Status code should be 200
- Body should contain 'success'

What will the rendered description look like?
medium
A. A heading 'Test Steps' followed by a numbered list with two items and a bulleted list under the second item
B. Plain text with no formatting
C. A bulleted list only with no heading
D. A numbered list with four items and no heading

Solution

  1. Step 1: Interpret Markdown syntax

    ### creates a heading. Numbers create a numbered list. Hyphens create bullet points.
  2. Step 2: Analyze the structure

    Heading 'Test Steps' appears. Then a numbered list with two items followed by a bulleted list with two points under the second item.
  3. Final Answer:

    A heading 'Test Steps' followed by a numbered list with two items and a bulleted list under the second item -> Option A
  4. Quick Check:

    ### = heading, 1./2. = numbered list, - = bullets [OK]
Hint: ### = heading, numbers = list, - = bullets [OK]
Common Mistakes:
  • Ignoring nested lists
  • Thinking numbers create bullets
  • Missing the heading formatting
4. You wrote this Markdown in a Postman description:
**Test Result:
Passed**

But it does not show bold text as expected. What is the error?
medium
A. Newline inside ** breaks bold formatting; use inline text instead
B. Missing closing ** at the end
C. Markdown does not support bold in Postman
D. You must use single asterisks for bold

Solution

  1. Step 1: Understand Markdown bold syntax

    Bold text must be continuous inside ** without line breaks.
  2. Step 2: Identify the problem with newline

    Newline inside ** causes Markdown to break formatting, so 'Passed' is not bold.
  3. Final Answer:

    Newline inside ** breaks bold formatting; use inline text instead -> Option A
  4. Quick Check:

    Bold text must be on one line [OK]
Hint: Keep bold text on one line [OK]
Common Mistakes:
  • Adding line breaks inside bold markers
  • Thinking Markdown is unsupported in Postman
  • Using wrong asterisks count for bold
5. You want to add a clickable link in your Postman description that says API Docs and points to https://docs.example.com. Which Markdown syntax is correct?
hard
A. "API Docs":https://docs.example.com
C. [API Docs](https://docs.example.com)
D. {API Docs}(https://docs.example.com)

Solution

  1. Step 1: Recall Markdown link syntax

    Markdown links use [text](url) format to create clickable links.
  2. Step 2: Evaluate options

    [API Docs](https://docs.example.com) uses correct Markdown syntax. API Docs is HTML, which may work but is not Markdown. The remaining options are invalid Markdown.
  3. Final Answer:

    [API Docs](https://docs.example.com) -> Option C
  4. Quick Check:

    Links = [text](url) [OK]
Hint: Use [text](url) for links [OK]
Common Mistakes:
  • Using HTML tags instead of Markdown
  • Wrong bracket types for links
  • Confusing quotes with brackets
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