What is the main goal of the error guessing technique in software testing?
Think about how testers use their knowledge and intuition.
Error guessing relies on the tester's experience to predict where errors might occur and create test cases accordingly.
Given a function that divides two numbers, a tester uses error guessing to test division by zero. What will be the output when the function is called with (10, 0)?
def divide(a, b): return a / b result = divide(10, 0)
What happens in Python when you divide by zero?
Dividing by zero in Python raises a ZeroDivisionError exception.
Which assertion is best to verify that a function raises an error when given invalid input during error guessing?
def test_invalid_input(): # Choose the correct assertion here pass
Look for the assertion that checks for exceptions.
assertRaises is used to check if a function raises a specific error when called with certain inputs.
A tester wrote a test case to check for null input handling but the test passes even when the function crashes. What is the likely cause?
Consider how exceptions are handled in tests.
If the test does not catch exceptions, the test framework may mark the test as failed incorrectly.
How can error guessing be effectively integrated into an automated testing framework?
Think about combining human knowledge with automation.
Error guessing works best when testers add their experience-based test cases into automated suites to catch common errors.