Complete the code to print the main testing approach used.
testing_approach = '[1]' print(f"Current testing approach: {testing_approach}")
The code sets the testing approach to 'Unit', which is a common starting point for testing small parts of code.
Complete the code to check if the testing strategy includes automation.
strategy = 'manual' if strategy == '[1]': print('Automation is part of the strategy') else: print('Manual testing only')
The code checks if the strategy is 'automation' to decide the testing method.
Fix the error in the code that decides the testing approach based on input.
def choose_approach(input): if input == '[1]': return 'Exploratory Testing' else: return 'Other Testing' print(choose_approach('exploratory'))
The input is lowercase 'exploratory', so the comparison must match exactly to avoid errors.
Fill both blanks to create a test plan dictionary with approach and priority.
test_plan = {
'approach': '[1]',
'priority': '[2]'
}The test plan uses 'Risk-based' approach and sets priority to 'High' to focus on important tests.
Fill all three blanks to create a function that returns a testing strategy summary.
def strategy_summary(approach, level, focus): return { 'approach': [1], 'level': [2], 'focus': [3] } summary = strategy_summary('Exploratory', 'Medium', 'User Experience') print(summary)
The function returns a dictionary with keys 'approach', 'level', and 'focus'. The values are passed as arguments, here 'Exploratory', 'Medium', and 'User Experience'.