Bird
0
0

Identify the error in this performance test script snippet:

medium📝 Debug Q6 of 15
Testing Fundamentals - Non-Functional Testing
Identify the error in this performance test script snippet:
def test_load():
    users = 100
    duration = "30"
    start_test(users, duration)
ADuration should be an integer, not a string
BUsers should be a string, not an integer
CFunction name must be capitalized
DMissing return statement
Step-by-Step Solution
Solution:
  1. Step 1: Check parameter types

    Duration is given as a string "30" but likely expected as integer for time in seconds.
  2. Step 2: Validate other parameters and syntax

    Users as integer is correct, function name casing is flexible, return not required here.
  3. Final Answer:

    Duration should be an integer, not a string -> Option A
  4. Quick Check:

    Parameter types must match expected input [OK]
Quick Trick: Check parameter types carefully in test scripts [OK]
Common Mistakes:
  • Ignoring type mismatch errors
  • Assuming function names must be capitalized
  • Expecting return when not needed

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Testing Fundamentals Quizzes