0
0
Testing Fundamentalstesting~20 mins

Test metrics and KPIs in Testing Fundamentals - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Test Metrics Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Defect Density

Which of the following best describes the defect density metric in software testing?

AThe number of defects found divided by the size of the software module, usually measured in lines of code.
BThe total number of test cases executed during a test cycle.
CThe percentage of test cases that passed successfully.
DThe average time taken to fix a defect after it is reported.
Attempts:
2 left
💡 Hint

Think about how defects relate to the size of the software.

Predict Output
intermediate
2:00remaining
Calculating Test Execution Rate

What is the output of the following Python code that calculates the test execution rate?

Testing Fundamentals
total_tests = 150
executed_tests = 120
execution_rate = (executed_tests / total_tests) * 100
print(f"Execution Rate: {execution_rate:.2f}%")
AExecution Rate: 80.00%
BExecution Rate: 100.00%
CExecution Rate: 120.00%
DExecution Rate: 75.00%
Attempts:
2 left
💡 Hint

Divide executed tests by total tests and multiply by 100.

assertion
advanced
2:00remaining
Validating Test Pass Rate Assertion

Given the following test results, which assertion correctly verifies that the pass rate is at least 90%?

total_tests = 200
passed_tests = 185
pass_rate = (passed_tests / total_tests) * 100
Aassert pass_rate > 90, f"Pass rate too low: {pass_rate}%"
Bassert pass_rate <= 90, f"Pass rate too low: {pass_rate}%"
Cassert pass_rate == 90, f"Pass rate too low: {pass_rate}%"
Dassert pass_rate >= 90, f"Pass rate too low: {pass_rate}%"
Attempts:
2 left
💡 Hint

Check if pass rate is at least 90% (greater than or equal).

🔧 Debug
advanced
2:00remaining
Debugging Incorrect Defect Leakage Calculation

The following code is intended to calculate defect leakage percentage but produces an incorrect result. What is the main issue?

defects_found_in_testing = 30
defects_found_in_production = 5
defect_leakage = defects_found_in_production / defects_found_in_testing * 100
print(f"Defect Leakage: {defect_leakage}%")
ADivision should be reversed: defects_found_in_testing / defects_found_in_production.
BThe calculation is correct; no issue present.
CInteger division is used; convert to float to avoid truncation.
DThe variable names are swapped; defects_found_in_production should be numerator.
Attempts:
2 left
💡 Hint

Check the formula for defect leakage: defects in production divided by defects found in testing.

framework
expert
2:00remaining
Choosing the Best KPI for Release Readiness

As a QA lead, you want to decide if a software release is ready based on test metrics. Which KPI is the most reliable indicator to include in your report?

APercentage of automated test cases executed successfully.
BNumber of defects found during testing.
CDefect severity distribution and open critical defects count.
DTotal number of test cases designed.
Attempts:
2 left
💡 Hint

Consider which metric reflects risk and quality impact most directly.