Which of the following best describes the defect density metric in software testing?
Think about how defects relate to the size of the software.
Defect density measures how many defects exist per unit size of software, helping teams understand quality relative to code size.
What is the output of the following Python code that calculates the test execution rate?
total_tests = 150 executed_tests = 120 execution_rate = (executed_tests / total_tests) * 100 print(f"Execution Rate: {execution_rate:.2f}%")
Divide executed tests by total tests and multiply by 100.
The code calculates the percentage of tests executed out of total tests, which is (120/150)*100 = 80.00%.
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
Check if pass rate is at least 90% (greater than or equal).
Option D correctly asserts that pass_rate is 90% or more. Option D excludes exactly 90%, C requires exact 90%, and D is incorrect logic.
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}%")Check the formula for defect leakage: defects in production divided by defects found in testing.
The formula is correct: defect leakage = (defects in production / defects found in testing) * 100. Python 3 uses float division by default, so no truncation occurs.
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?
Consider which metric reflects risk and quality impact most directly.
Defect severity distribution and count of open critical defects provide insight into risk and quality, making it the best KPI for release readiness.