Test Overview
This test checks if the tester correctly decides when to use automated testing versus manual testing based on test case characteristics.
This test checks if the tester correctly decides when to use automated testing versus manual testing based on test case characteristics.
def decide_test_method(test_case): """Decide whether to automate or do manual testing based on test case properties.""" if test_case['is_repetitive'] and test_case['stable_requirements'] and test_case['high_risk_area']: return 'Automate' elif test_case['requires_exploratory'] or test_case['one_time_test']: return 'Manual' else: return 'Manual' # Example test cases repetitive_test = {'is_repetitive': True, 'stable_requirements': True, 'high_risk_area': True, 'requires_exploratory': False, 'one_time_test': False} exploratory_test = {'is_repetitive': False, 'stable_requirements': False, 'high_risk_area': False, 'requires_exploratory': True, 'one_time_test': False} one_time_test = {'is_repetitive': False, 'stable_requirements': True, 'high_risk_area': False, 'requires_exploratory': False, 'one_time_test': True} assert decide_test_method(repetitive_test) == 'Automate' assert decide_test_method(exploratory_test) == 'Manual' assert decide_test_method(one_time_test) == 'Manual'
| Step | Action | System State | Assertion | Result |
|---|---|---|---|---|
| 1 | Test starts | Test function decide_test_method is ready to run with example test cases | - | PASS |
| 2 | Call decide_test_method with repetitive_test case | Input: {'is_repetitive': True, 'stable_requirements': True, 'high_risk_area': True, 'requires_exploratory': False, 'one_time_test': False} | Return value should be 'Automate' | PASS |
| 3 | Call decide_test_method with exploratory_test case | Input: {'is_repetitive': False, 'stable_requirements': False, 'high_risk_area': False, 'requires_exploratory': True, 'one_time_test': False} | Return value should be 'Manual' | PASS |
| 4 | Call decide_test_method with one_time_test case | Input: {'is_repetitive': False, 'stable_requirements': True, 'high_risk_area': False, 'requires_exploratory': False, 'one_time_test': True} | Return value should be 'Manual' | PASS |
| 5 | All assertions checked | All test cases returned expected results | All assert statements passed | PASS |