0
0
Postmantesting~10 mins

Why Postman supports non-functional testing - Test Execution Impact

Choose your learning style9 modes available
Test Overview

This test checks if Postman can perform non-functional testing by measuring response time and validating server performance under load.

Test Code - Python requests with assertions (simulating Postman test)
Postman
import requests
import time

def test_response_time():
    url = "https://api.example.com/data"
    start_time = time.time()
    response = requests.get(url)
    end_time = time.time()
    response_time = end_time - start_time
    assert response.status_code == 200, f"Expected status 200 but got {response.status_code}"
    assert response_time < 0.5, f"Response time too high: {response_time}s"

if __name__ == "__main__":
    test_response_time()
Execution Trace - 5 Steps
StepActionSystem StateAssertionResult
1Test startsTest environment ready, network available-PASS
2Send GET request to https://api.example.com/dataRequest sent, waiting for response-PASS
3Receive response with status code 200Response received with data payloadCheck if status code == 200PASS
4Measure response timeResponse time calculated as 0.3 secondsVerify response time < 0.5 secondsPASS
5Test ends with all assertions passedTest completed successfully-PASS
Failure Scenario
Failing Condition: Response time exceeds 0.5 seconds or status code is not 200
Execution Trace Quiz - 3 Questions
Test your understanding
What does the test verify about the API response?
AOnly response content correctness
BResponse status code and response time
CDatabase connection status
DUser interface layout
Key Result
Non-functional testing in Postman includes checking API performance metrics like response time, which helps ensure the API meets speed and reliability expectations.