0
0
Testing Fundamentalstesting~10 mins

Performance test types (load, stress, spike, soak) in Testing Fundamentals - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a load test that simulates {{BLANK_1}} users accessing the system simultaneously.

Testing Fundamentals
def load_test():
    users = [1]
    for user in range(users):
        simulate_user_action()
Drag options to blanks, or click blank then click option'
A1000
B0
C50
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 0 users which means no load.
Choosing 1000 users which is too high for a basic load test.
2fill in blank
medium

Complete the code to define a stress test that pushes the system beyond its {{BLANK_1}} capacity.

Testing Fundamentals
def stress_test():
    max_capacity = 100
    users = [1]
    for user in range(users):
        simulate_user_action()
Drag options to blanks, or click blank then click option'
A100
B150
C50
D10
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 50 or 100 which are at or below max capacity.
3fill in blank
hard

Fix the error in the spike test code to simulate a sudden increase in users to {{BLANK_1}}.

Testing Fundamentals
def spike_test():
    users = 10
    simulate_user_action()
    users = [1]
    simulate_user_action()
Drag options to blanks, or click blank then click option'
A5
B-10
C0
D1000
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing negative or zero users which is invalid.
Choosing a smaller number than initial users.
4fill in blank
hard

Fill both blanks to define a soak test that runs for {{BLANK_1}} hours with {{BLANK_2}} users continuously.

Testing Fundamentals
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()
Drag options to blanks, or click blank then click option'
A24
B100
C12
D50
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing short durations or too many users for soak tests.
5fill in blank
hard

Fill all three blanks to create a dictionary summarizing test types with their key characteristics.

Testing Fundamentals
test_types = {
    'load': '[1]',
    'stress': '[2]',
    'spike': '[3]'
}
Drag options to blanks, or click blank then click option'
Anormal user load
Bbeyond max capacity
Csudden user increase
Dlong duration run
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up soak test characteristics with others.