Create and verify a mock response for a GET user API
Preconditions (2)
Step 1: Open the Postman app and select the collection containing GET /user
Step 2: Click on the 'Mocks' tab in the collection view
Step 3: Click 'Create a mock server'
Step 4: Set the mock server name to 'User API Mock'
Step 5: Select the GET /user request to mock
Step 6: Define the mock response with status 200 and JSON body: {"id":1,"name":"John Doe"}
Step 7: Save the mock server
Step 8: Send a GET request to the mock server URL for /user
Step 9: Verify the response status is 200
Step 10: Verify the response body matches {"id":1,"name":"John Doe"}
✅ Expected Result: The mock server returns the defined JSON response with status 200 when GET /user is called