0
0
Testing Fundamentalstesting~10 mins

Why white-box testing examines code internals in Testing Fundamentals - Test Your Understanding

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

Complete the code to show what white-box testing focuses on.

Testing Fundamentals
def test_function():
    # White-box testing examines [1] of the code
    pass
Drag options to blanks, or click blank then click option'
Ainternal logic
Buser interface
Cnetwork speed
Ddatabase size
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing white-box testing with testing user interface or performance.
2fill in blank
medium

Complete the code to identify a white-box testing technique.

Testing Fundamentals
def test_coverage():
    # White-box testing uses [1] to check which parts of code run
    pass
Drag options to blanks, or click blank then click option'
Ablack-box methods
Bload testing
Ccode coverage
Duser surveys
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing black-box or performance testing terms instead.
3fill in blank
hard

Fix the error in the white-box testing description.

Testing Fundamentals
def white_box_test():
    '''White-box testing ignores [1] and focuses on outputs.'''
    pass
Drag options to blanks, or click blank then click option'
Aexternal behavior
Buser inputs
Ccode internals
Dinternal code
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing white-box with black-box testing focus.
4fill in blank
hard

Fill both blanks to complete the white-box testing example.

Testing Fundamentals
def test_branch_coverage():
    for condition in conditions:
        if condition [1] True:
            execute_path = [2]
        else:
            execute_path = 'other'
    return execute_path
Drag options to blanks, or click blank then click option'
A==
B!=
C'path1'
D'path2'
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' for condition check.
Choosing wrong path string.
5fill in blank
hard

Fill all three blanks to complete the white-box testing dictionary comprehension.

Testing Fundamentals
coverage = {func[1]: calls for func, calls in call_counts.items() if calls [2] 0 and func.startswith([3])}
Drag options to blanks, or click blank then click option'
A()
B>
C'test_'
D[]
Attempts:
3 left
💡 Hint
Common Mistakes
Using brackets instead of parentheses for function call.
Using '<' instead of '>'.