Which of the following best describes response time in performance testing?
Think about how long a user waits after making a request.
Response time measures how long it takes for the system to reply to one request, not the total or throughput.
Given the following test results, what is the throughput (requests per second)?
total_requests = 500 total_time_seconds = 50 throughput = total_requests / total_time_seconds print(throughput)
total_requests = 500 total_time_seconds = 50 throughput = total_requests / total_time_seconds print(throughput)
Divide total requests by total time in seconds.
Throughput is requests divided by time, so 500 / 50 = 10 requests per second.
Which assertion correctly checks that the response time is less than 2 seconds in a test script?
response_time = 1.8 # seconds
We want to confirm response time is under the limit.
To ensure response time is less than 2 seconds, use < 2 in the assertion.
Find the error in this throughput calculation code snippet:
total_requests = 1000 total_time_seconds = 0 throughput = total_requests / total_time_seconds print(throughput)
Check if dividing by zero is possible.
Dividing by zero causes a runtime error; total_time_seconds cannot be zero.
In a load test simulating 1000 users, which metric best indicates how many requests the system handles per second?
Think about the number of requests processed over time.
Throughput measures requests per second, showing system capacity under load.