Using the standard transition-tree approach for state-based testing, you build paths from the initial Login state and terminate each path the first time it revisits a state already seen in that path (i.e., returns to Menu) or reaches a terminal state (Logout). This yields five distinct paths: (1) invalid login looping back to Login then a valid login to Menu, (2) login to Menu, select Withdraw, then return to Menu, (3) login to Menu, select Deposit, then return to Menu, (4) login to Menu, select Balance, then return to Menu, and (5) login to Menu, then select Logout. Together these five test cases exercise every transition in the diagram exactly once (or more), so five test cases are the minimum required for full transition coverage under the stated stopping rule.
Community Discussion