0
0
Testing Fundamentalstesting~10 mins

Integration testing 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 call the integration test function.

Testing Fundamentals
def test_integration():
    result = [1]()
    assert result == 'success'
Drag options to blanks, or click blank then click option'
Arun_integration_test
Bmock_test
Cunit_test
Dintegration_test
Attempts:
3 left
💡 Hint
Common Mistakes
Calling a unit test function instead of integration test.
2fill in blank
medium

Complete the code to check if the integration test passed.

Testing Fundamentals
def check_result(output):
    if output [1] 'success':
        return True
    return False
Drag options to blanks, or click blank then click option'
A==
B!=
C>
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' causes wrong test results.
3fill in blank
hard

Fix the error in the integration test assertion.

Testing Fundamentals
def test_integration():
    output = integration_test()
    assert output [1] 'success'
Drag options to blanks, or click blank then click option'
A=
B==
C!=
D=>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '=' instead of '==' in assert causes syntax error.
4fill in blank
hard

Fill both blanks to create a dictionary of test results where keys are test names and values are their statuses.

Testing Fundamentals
test_results = {"login": [1], "payment": [2]
Drag options to blanks, or click blank then click option'
A'passed'
B'failed'
C'success'
D'error'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up test names and statuses.
5fill in blank
hard

Fill both blanks to create a filtered dictionary of tests that passed.

Testing Fundamentals
passed_tests = {k: v for k, v in test_results.items() if v {BLANK_2}} {{BLANK_2}}
Drag options to blanks, or click blank then click option'
A:
B==
C'passed'
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong operators or missing quotes around 'passed'.