What is the main goal of stress testing in software testing?
Think about testing limits beyond usual usage.
Stress testing focuses on pushing the system beyond its normal limits to see how it behaves under extreme conditions.
Given a stress test script that increases user load until failure, what does a sudden crash at 1500 users indicate?
max_users = 0 for users in range(100, 2000, 100): if system_stress_test(users) == 'fail': max_users = users - 100 break print(max_users)
Look at the loop and when it breaks.
The loop breaks when failure occurs at 1500 users, so the last successful load is 1400 users.
Which assertion correctly verifies that the system response time stays below 5 seconds under stress?
response_time = get_response_time_under_load()
# Choose the correct assertion belowWe want to ensure response time is less than 5 seconds.
Assertion C checks that response time is less than 5 seconds, which is the correct condition.
What is the bug in the following stress test code snippet?
def stress_test(system, max_load): load = 0 while load <= max_load: result = system.run(load) if result == 'fail': break load += 10 return load final_load = stress_test(my_system, 100) print(final_load)
Check what value is returned when failure occurs.
The function returns the load value where failure happened, but it should return the last successful load (load - 10).
Which feature is MOST important to include in a stress test automation framework to ensure reliable results?
Think about maintaining consistent test conditions.
Automatic recovery and cleanup ensure each test starts fresh, avoiding false failures due to leftover state.