0
0
Testing Fundamentalstesting~10 mins

Test reporting in pipelines 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 print a simple test report status.

Testing Fundamentals
print('Test suite execution [1]')
Drag options to blanks, or click blank then click option'
Acompleted
Bstart
Cfail
Drunning
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'start' or 'running' which mean tests are not finished.
2fill in blank
medium

Complete the code to check if the test report status is 'passed'.

Testing Fundamentals
if report_status == '[1]':
    print('All tests passed!')
Drag options to blanks, or click blank then click option'
Afailed
Bpassed
Cerror
Dskipped
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'failed' or 'error' which mean tests did not pass.
3fill in blank
hard

Fix the error in the code to correctly log the test result count.

Testing Fundamentals
test_results = {'passed': 10, 'failed': 2}
print('Passed tests:', test_results[1])
Drag options to blanks, or click blank then click option'
A['passed']
Bpassed
C(passed)
D{'passed'}
Attempts:
3 left
💡 Hint
Common Mistakes
Using parentheses or curly braces which cause errors.
4fill in blank
hard

Fill both blanks to create a dictionary comprehension that filters passed tests with count > 5.

Testing Fundamentals
filtered_results = {k: v for k, v in test_results.items() if k [1] 'passed' and v [2] 5}
Drag options to blanks, or click blank then click option'
A==
B>
C<
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' or '!=' which filter wrong results.
5fill in blank
hard

Fill all three blanks to create a test report summary dictionary with uppercase keys and counts greater than zero.

Testing Fundamentals
summary = [1]: [2] for k, v in test_results.items() if v [3] 0
Drag options to blanks, or click blank then click option'
Ak.upper()
Bv
C>
Dk
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'k' instead of 'k.upper()' or wrong comparison operators.