
|
Deriving Structural and Interaction Test Cases Testing distributed architectures State based testing Event based testing of
JavaBean |
TicTacToe Game Using concurrent state chart to test Player object
We commence testing Player object's interactions. State based testing
of Player object involves exercising the states, transitions and methods
associated with this one object. State based test cases are selected
based on the coverage required from the model. The coverage objective
may include visiting all states, exercising all transitions and/or exercising
all methods in a state chart. For example: follow the states - Connected to MyTurn to Playing to Tied or follow the event (transitions) from initialize to setYourTurn(true) to setGameStatus. Automation of the event flow between concurrent states with interleaving semantics is useful to exercise the concurrency and communication aspects of the system. Test Case Scenario Our Test case selection strategy is to exercise the state transitions as shown in the concurrent state chart. Demonstration: State chart visiting all Player states
Expected Results: When the system is run using the test cases as shown in the animation that follows, it should be enter and exit these states as shown. Coverage check: It is necessary to revisit the design diagram and check if any of the methods specified there have been accidentally missed from the player state model. Sanity check: No errors or exceptions have been modeled in the state
chart. Execution may reveal some surprises. Demonstration of the Player object and discussion of the steps Generating the test sequences for the Player's concurrent state chart using interleaving semantics. Left to the reader as an exercise. |
Funded by Committee of University Teaching And Staff Development (CUTSD) through DEETYA, 1998