0
0
Postmantesting~10 mins

Description formatting (Markdown) in Postman - Test Execution Trace

Choose your learning style9 modes available
Test Overview

This test verifies that a Postman request description supports Markdown formatting correctly. It checks if the description renders bold and italic text as expected.

Test Code - Postman Test Script
Postman
pm.test("Description renders Markdown correctly", () => {
    const description = pm.request.description.toString();
    pm.expect(description).to.include("**bold text**");
    pm.expect(description).to.include("*italic text*");
});
Execution Trace - 5 Steps
StepActionSystem StateAssertionResult
1Test startsPostman request with description containing Markdown syntax '**bold text**' and '*italic text*'-PASS
2Access request description as stringDescription string retrieved from request-PASS
3Check if description includes '**bold text**'Description string contains Markdown bold syntaxpm.expect(description).to.include('**bold text**')PASS
4Check if description includes '*italic text*'Description string contains Markdown italic syntaxpm.expect(description).to.include('*italic text*')PASS
5Test endsAll assertions passed-PASS
Failure Scenario
Failing Condition: Description does not contain expected Markdown syntax for bold or italic text
Execution Trace Quiz - 3 Questions
Test your understanding
What does the test check in the Postman request description?
AIf the description contains Markdown bold and italic syntax
BIf the description contains JSON data
CIf the description is empty
DIf the description contains HTML tags
Key Result
Always verify that your test accesses the correct property and checks for the exact Markdown syntax you expect in Postman descriptions to ensure accurate validation.