0
0
Testing Fundamentalstesting~10 mins

Test metrics and KPIs 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 calculate the defect density.

Testing Fundamentals
defect_density = total_defects / [1]
Drag options to blanks, or click blank then click option'
Atotal_test_cases
Btotal_lines_of_code
Ctotal_test_runs
Dtotal_testers
Attempts:
3 left
💡 Hint
Common Mistakes
Using total_test_cases instead of total_lines_of_code.
2fill in blank
medium

Complete the code to calculate test execution progress percentage.

Testing Fundamentals
progress = (executed_tests / [1]) * 100
Drag options to blanks, or click blank then click option'
Atotal_tests
Bpassed_tests
Cfailed_tests
Dblocked_tests
Attempts:
3 left
💡 Hint
Common Mistakes
Using passed_tests or failed_tests instead of total_tests.
3fill in blank
hard

Fix the error in the code to calculate test pass rate.

Testing Fundamentals
pass_rate = (passed_tests / [1]) * 100
Drag options to blanks, or click blank then click option'
Ablocked_tests
Btotal_tests
Cfailed_tests
Dexecuted_tests
Attempts:
3 left
💡 Hint
Common Mistakes
Using total_tests instead of executed_tests causes incorrect pass rate.
4fill in blank
hard

Fill both blanks to calculate defect removal efficiency.

Testing Fundamentals
defect_removal_efficiency = (defects_found_in_testing / [1]) * [2]
Drag options to blanks, or click blank then click option'
Atotal_defects
B100
Ctotal_test_cases
Dexecuted_tests
Attempts:
3 left
💡 Hint
Common Mistakes
Using total_test_cases or executed_tests instead of total_defects.
5fill in blank
hard

Fill all three blanks to create a dictionary of test metrics with conditions.

Testing Fundamentals
metrics = {test + [1]: result for test, result in test_results.items() if result [2] [3]
Drag options to blanks, or click blank then click option'
A_id
B==
C'pass'
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' causes wrong filtering.