Bird
0
0

Given the following pseudo-code for a stress test:

medium📝 Predict Output Q4 of 15
Testing Fundamentals - Non-Functional Testing
Given the following pseudo-code for a stress test:
for users in range(1000, 1003):
    simulate_users(users)
    print(system_response_time())

What will be the output if the system response times are 200ms, 350ms, and 500ms respectively?
AError due to range usage
B500 350 200
C200 350 500
D200 350 500
Step-by-Step Solution
Solution:
  1. Step 1: Understand the loop range and iterations

    The loop runs for users = 1000, 1001, 1002 (3 iterations).
  2. Step 2: Match response times to iterations

    Each iteration prints the response time in order: 200, then 350, then 500.
  3. Final Answer:

    200 350 500 -> Option D
  4. Quick Check:

    Output matches response times in loop order [OK]
Quick Trick: Loop prints outputs in order of iterations [OK]
Common Mistakes:
  • Assuming reversed output order
  • Confusing range end value
  • Thinking range causes error

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Testing Fundamentals Quizzes