0
0
Testing Fundamentalstesting~10 mins

Boundary value analysis in Testing Fundamentals - Test Execution Trace

Choose your learning style9 modes available
Test Overview

This test checks if the input field correctly accepts values at the boundary limits and rejects values outside those limits. It verifies that the system handles edge cases properly.

Test Code - PyTest
Testing Fundamentals
def is_valid_input(value):
    return 1 <= value <= 10

def test_input_boundary_values():
    min_value = 1
    max_value = 10

    # Test lower boundary
    assert is_valid_input(min_value) == True

    # Test just below lower boundary
    assert is_valid_input(min_value - 1) == False

    # Test upper boundary
    assert is_valid_input(max_value) == True

    # Test just above upper boundary
    assert is_valid_input(max_value + 1) == False
Execution Trace - 6 Steps
StepActionSystem StateAssertionResult
1Test startsTest environment initialized-PASS
2Call is_valid_input with value 1 (lower boundary)Function receives input 1Assert that return value is TruePASS
3Call is_valid_input with value 0 (just below lower boundary)Function receives input 0Assert that return value is FalsePASS
4Call is_valid_input with value 10 (upper boundary)Function receives input 10Assert that return value is TruePASS
5Call is_valid_input with value 11 (just above upper boundary)Function receives input 11Assert that return value is FalsePASS
6Test endsAll assertions passed-PASS
Failure Scenario
Failing Condition: The function incorrectly accepts a value outside the boundary or rejects a value within the boundary.
Execution Trace Quiz - 3 Questions
Test your understanding
What value is tested to check the lower boundary?
A0
B1
C10
D11
Key Result
Boundary value analysis helps catch errors at the edges of input ranges by testing values just inside and just outside the limits, ensuring robust input validation.