Complete the code to define a load test that simulates {{BLANK_1}} users accessing the system simultaneously.
def load_test(): users = [1] for user in range(users): simulate_user_action()
A load test simulates a typical number of users, such as 50, to check system behavior under expected load.
Complete the code to define a stress test that pushes the system beyond its {{BLANK_1}} capacity.
def stress_test(): max_capacity = 100 users = [1] for user in range(users): simulate_user_action()
A stress test pushes the system beyond its max capacity, so 150 users exceed 100 max capacity.
Fix the error in the spike test code to simulate a sudden increase in users to {{BLANK_1}}.
def spike_test(): users = 10 simulate_user_action() users = [1] simulate_user_action()
A spike test simulates a sudden jump to a high number like 1000 users.
Fill both blanks to define a soak test that runs for {{BLANK_1}} hours with {{BLANK_2}} users continuously.
def soak_test(): duration_hours = [1] users = [2] start_time = current_time() while current_time() - start_time < duration_hours * 3600: for user in range(users): simulate_user_action()
A soak test runs for a long time like 24 hours with a moderate number of users like 50.
Fill all three blanks to create a dictionary summarizing test types with their key characteristics.
test_types = {
'load': '[1]',
'stress': '[2]',
'spike': '[3]'
}Load tests simulate normal user load, stress tests push beyond max capacity, and spike tests simulate sudden user increases.