Complete the code to define the main goal of risk-based testing.
risk_based_testing_goal = "Focus testing on areas with [1] risk"
The main goal of risk-based testing is to focus testing efforts on the areas with the highest risk to catch critical issues early.
Complete the code to calculate risk as a product of impact and likelihood.
risk = impact [1] likelihoodRisk is commonly calculated by multiplying impact and likelihood to prioritize testing.
Fix the error in the code that selects test cases based on risk threshold.
selected_tests = [test for test in tests if test.risk [1] 5]
We select tests with risk greater than 5 to focus on higher risk areas.
Fill both blanks to create a dictionary of test cases with risk above threshold and their impact.
high_risk_tests = {test.name: test.[1] for test in tests if test.[2] > 7}The dictionary maps test names to their impact for tests with risk greater than 7.
Fill all three blanks to create a list of test names with risk above 6 and likelihood above 3.
selected = [test.[1] for test in tests if test.[2] > 6 and test.[3] > 3]
This list comprehension selects test names where risk is above 6 and likelihood is above 3.