Test Plan
These are the test plans for the Traffic Jam Puzzle computer solitaire
game.
1.2 displayBoard
Purpose: Verify that the board is displayed properly.
Procedure: Start the game, and make the moves shown in the User
Interface Prototype.
Observe the board display after each move.
Validation criteria: The display shows the board exactly as shown in
the Prototype.
1.1 makeMove
Purpose: Verify that the game allows the player to make moves.
Procedure: Start the game, and at the prompt, enter the digit 5 and
press Enter.
Observe the board display which results.
Validation criteria: The empty stone has been replaced by the marker,
and the stone at position 5 is empty.
1.3 resetBoard
Purpose: Verify that the board is reset correctly.
Procedure: Start the game, make two moves, then invoke the Reset
function.
Observe the reset board display.
Validation criteria: The display shows the board in its starting
configuration:
Five left-most markers facing right, and five right-most markers facing
left, with an empty stone in the middle.
1.1.2 isLegal
Purpose: Verify that the game correctly identifies invalid moves.
Validation criteria: for each procedure below, the application should
ignore the move (the board is unchanged).
1.1.2a Procedure: Make a move that is too high (greater than
11).
Make a move that is too low (less than 1).
1.1.2b Procedure: Move the "empty" stone.
1.1.2c Procedure: Move a stone facing right where the stone to it's
right
has a Right marker.
Move a stone facing right where the stone to it's right has a Left
marker
and the "leapfrog" stone is occupied.
1.1.2d Procedure: Move a stone facing left where the stone to it's
left
has a Left marker.
Move a stone facing left where the stone to it's left has a Left marker
and the "leapfrog" stone is occupied.
.
1.5 updateBoard
Purpose: Verify that the board is properly updated after a valid move.
Procedure: Make a valid move, observe the updated board display.
Validation criteria: The empty stone has been replaced by the marker,
and the stone from which the marker was taken becomes empty.
1.4 isSolved
Purpose: Verify that a win is properly detected.
Procedure: Set the board to a configuration that is one move away from
winning. Start the game, and make the winning move.
Validation criteria: The win message is displayed.
Note: Tests for non-functional
requirements are still under construction.
Testability Considerations
Controllability: It would be helpful for testing if could
start the game with the
board in various configurations. Consider implementing the
application with a command line
parameter that allows the starting board configuration to be loaded
from
an external file.