ChesServe Test Plan ChesServe CS 451 Allan Caffee Charles Conroy Kyle Golrick Christopher Gore David Kerkeslager
Date Reason For Change Version Thursday August 21 th Initial Version 1.0 Thursday August 28 th Revised to Professor's Comments 2.0 ii
All members of the ChesServe team were involved in the development of this document. Allan Caffee Charles Conroy Kyle Golrick Christopher Gore David Kerkeslager iii
August 28, 2008 Contents 1 ABSTRACT......1 2 INTRODUCTION... 1 2.1 PURPOSE......1 2.2 SCOPE......1 2.3 DEFINITIONS......1 3 ENTRY AND EXIT CRITERIA...2 3.1 ENTRY CRITERIA......2 3.2 EXIT CRITERIA......2 4 TEST CASES......2 4.1 LOGGING IN....2 4.2 GAME PAGE CHAT FUNCTIONALITY......3 4.3 GAME PAGE CHESSBOARD FUNCTIONALITY...3 4.4 CONNECTION FAILURE......3 5.1 GAME LOGIC PAWN......3 5.2 GAME LOGIC - ROOK......6 5.3 GAME LOGIC - BISHOP......8 5.4 GAME LOGIC - KNIGHT......10 5.5 GAME LOGIC - QUEEN......11 5.6 GAME LOGIC - KING....13 5.7 GAME LOGIC - STALEMATE......15 i
1 Abstract This is document provides a test plan for the ChesServe chess game. 2 Introduction 2.1 Purpose The purpose of this document is to detail the tests to be performed on the chess game to verify that it operates properly. 2.2 Scope This document covers test plan of the system from an abstract perspective. This does not detail any design or implementation strategies. The acceptance test will check the functional requirements of the system, and the usability of the system. 2.3 Definitions 2.3.1.1 Check: a position in which the king can be taken in the next move of the opposing player 2.3.1.2 Checkmate: a position in which the king can be taken in the next move of the opposing player and no move can be made to prevent the capture of the king 2.3.2 Player: A user playing a game of chess 2.3.3 Rank: The rows of a chessboard, labeled 1-8 2.3.4 File: The columns of a chessboard, labeled A-H 2.3.5 Capture: When a legal move made by player A results in the opposing player having to remove that piece from the board and concurrently player A's piece now occupies that spot. 2.3.6 Stalemate: Neither player is capable of making a move that progresses toward the checkmate of the other player. 08/14/08 ChesServe 1
2.3.7 Diagonal: A move characterized by (rank+n, file+n) 2.3.8 Opponent: Player not currently moving 2.3.9 Forward: Move towards opponent 2.3.10 Backward: Move away from opponent 3 Entry and Exit Criteria 3.1 Entry Criteria The test may begin after the following have been met upon. 3.1.1 The software requirements have been received and agreed 3.1.2 The latest version of the ChesServe software has been obtained. 3.1.3 The project leader and client have been notified. 3.2 Exit Criteria The test shall conclude after one of the following conditions 3.2.1 All top priority functionality tests successfully. (Success) 3.2.2 One or more top priority functionality test fails. (Failure) 4 Test Cases The following test cases cover the functional requirements of the ChesServe system. 4.1 Logging In The user has opened the game through python. The user enters a nickname, I.P. address and port number. The user then clicks on the enter button. The user is redirected to the game screen. 08/14/08 ChesServe 2
4.2 Game Page chat functionality The user has logged in and is in an active game. s The user enters text in the chat window and presses the enter key. The text is displayed in the chat window. 4.3 Game Page chessboard functionality The user has logged in and is in an active game. The user enters a move in algebraic notation and presses enter. If the move is invalid, an error screen is produced. If the move is valid, the move is executed. If the move results in checkmate, the players shall be notified of the win. 4.4 Connection Failure The user has logged in and is in an active game. The user closes game or loses connection. The game shall alert the opponent that the user has lost connection. 5 Testing Game Logic The following tests shall be executed using test 4.3 to check that the game logic is correct. 5.1 Game Logic Pawn 5.1.1 The user attempts to move the pawn along the board within it's rank. 08/14/08 ChesServe 3
5.1.2 The user attempts to move the pawn three or more positions forward on the board. 5.1.3 The user attempts to move the pawn diagonally along the board to a vacant position or a position occupied by the same color piece. 5.1.4 The user attempts to move the pawn backwards along the board. 5.1.5 The user attempts to move the pawn forward along the board into an occupied position. 5.1.6 The user attempts to move the pawn forward 2 positions, 08/14/08 ChesServe 4
after the pawn has been moved once. 5.1.7 The user attempts to move the pawn to a position that will leave the king in check. 5.1.8 The user attempts to move the pawn forward one position into an unoccupied position. Game shall update board with pawn moved. 5.1.9 The user attempts to move the pawn forward two positions into an unoccupied position as the pawn's first move. Game shall update board with pawn moved. 5.1.10 The user attempts to move the pawn diagonally into a position occupied by an opponent's piece. Game shall update board with pawn moved, and the opponent captured. 5.1.11 The user attempts to moves the pawn into a position that 08/14/08 ChesServe 5
results in checkmate. Game shall update board with pawn moved, and alert players to the end of the game. 5.2 Game Logic - Rook 5.2.1 The user attempts to move the rook to a position that is not within the rooks rank or file. 5.2.2 The user attempts to move the rook within it's file into a position occupied by a piece of the same color. 5.2.3 The user attempts to move the rook within it's rank into a position occupied by a piece of the same color. 5.2.4 The user attempts to move the rook within it's file through a position occupied by any piece. 5.2.5 08/14/08 ChesServe 6
The user attempts to move the rook within it's rank through a position occupied by any piece. 5.2.6 The user attempts to move the rook while the rook is blocking check. 5.2.7 The user attempts to move the rook within it's rank to an open position that is not blocked. Game shall update board with rook moved. 5.2.8 The user attempts to move the rook within it's file to an open position that is not blocked. Game shall update board with rook moved. 5.2.9 The user attempts to move the rook within it's rank to a position that is not blocked and occupied by an opponent's piece. Game shall update board with rook moved and the opponent's piece captured. 5.2.10 08/14/08 ChesServe 7
The user attempts to move the rook within it's file to a position that is not blocked and occupied by an opponent's piece. Game shall update board with rook moved and the opponent's piece captured. 5.2.11 The user attempts to move the rook within it's rank to a position that is not blocked and occupied by the opponent's king. Game shall update board with rook moved and alert players to the end of the game. 5.2.12 The user attempts to move the rook within it's file to a position that is not blocked and occupied by the opponent's king. Game shall update board with rook moved and alert players to the end of the game. 5.3 Game Logic - Bishop 5.3.1 The user attempts to move the bishop to a position that does not fall within the pattern: (rank + n, file + n). 5.3.2 08/14/08 ChesServe 8
The user attempts to move the bishop diagonally along the board into a position occupied by a piece of the same color. 5.3.3 The user attempts to move the bishop diagonally along the board through a position occupied by any piece. 5.3.4 The user attempts to move the bishop while the bishop is blocking check. 5.3.5 The user attempts to move the bishop diagonally to an open position that is not blocked. Game shall update board with bishop moved. 5.3.6 The user attempts to move the bishop diagonally to a position that is not blocked and occupied by an opponent's piece. Game shall update board with bishop moved and the opponent's piece captured. 5.3.8 08/14/08 ChesServe 9
The user attempts to move the bishop diagonally to a position that is not blocked and open, creating checkmate. Game shall update board with bishop moved and alert players to the end of the game. 5.4 Game Logic - Knight 5.4.1 The user attempts to move the knight to a position that does not fall within the pattern: (rank +- 2, file +- 1) or (rank +- 1, file +- 2). 5.4.2 The user attempts to move the knight into a position occupied by a piece of the same color. 5.4.3 The user attempts to move the knight while the knight is blocking check. 5.4.4 The user attempts to move the knight to a position that falls within the pattern: (rank +- 2, file +- 1) or (rank +- 1, file +- 08/14/08 ChesServe 10
2) that is open. Game shall update board with knight moved. 5.4.5 The user attempts to move the knight to a position that falls within the pattern: (rank +- 2, file +- 1) or (rank +- 1, file +- 2), is not blocked, and is occupied by an opponent's piece. Game shall update board with knight moved and the opponent's piece captured. 5.4.6 The user attempts to move the knight to a position that falls within the pattern: (rank +- 2, file +- 1) or (rank +- 1, file +- 2), is not blocked, is open, and creates checkmate. Game shall update board with knight moved and alert players to the end of the game. 5.5 Game Logic - Queen 5.5.1 The user attempts to move the queen to a position that does not fall within it's rank, file, or the pattern: (rank + n, file + n). 5.5.2 The user attempts to move the queen into a position 08/14/08 ChesServe 11
occupied by a piece of the same color. 5.5.3 The user attempts to move the queen through a position occupied by any piece. 5.5.4 The user attempts to move the queen while the queen is blocking check. 5.5.5 The user attempts to move the queen to a position that does falls within it's rank, file, or the pattern: (rank + n, file + n) that is open. Game shall update board with queen moved. 5.5.6 The user attempts to move the queen to a position that does falls within it's rank, file, or the pattern: (rank + n, file + n), is not blocked, and is occupied by an opponent's piece. Game shall update board with queen moved and the opponent's piece captured. 5.5.7 08/14/08 ChesServe 12
The user attempts to move the queen to a position that does falls within it's rank, file, or the pattern: (rank + n, file + n), is not blocked, and creates checkmate. Game shall update board with queen moved and alert players to the end of the game. 5.6 Game Logic - King 5.6.1 The user attempts to move the king to a position that does not fall within it's rank +- 1, file +-1, or the pattern: (rank +- 1, file +- 1). 5.6.2 The user attempts to move the king into a position occupied by a piece of the same color. 5.6.3 The user attempts to move the king into check. 5.6.4 The user attempts to move the king to a position that does falls within it's rank +- 1, file +- 1, or the pattern: (rank +- 08/14/08 ChesServe 13
1, file +- 1) that is open. Game shall update board with king moved. 5.6.5 The user attempts to move the king to a position that does falls within it's rank +- 1, file +- 1, or the pattern: (rank +- 1, file +- 1), is not blocked, and is occupied by an opponent's piece. Game shall update board with king moved and the opponent's piece captured. 5.6.6 The user attempts to castle and the king or rook has already been moved. 5.6.7 The user attempts to castle and neither the king nor rook has been moved, and the king is in check or moves through a position that would place the king in check, and there are no pieces blocking the castle. 5.6.8 The user attempts to castle and neither the king nor rook has been moved, and the king is not in check nor does the king move through a position that would place the king in 08/14/08 ChesServe 14
check, and there is at least one piece blocking the castle. 5.6.9 The user attempts to castle and neither the king nor rook has been moved, and the king is not in check nor does the king move through a position that would place the king in check, and there are no pieces blocking the castle. 5.7 Game Logic - Stalemate 5.7.1 Both users have only a king. Board updates Game shall notify users of a stalemate. 5.7.2 The user can not make a move without putting his king in check. Board updates Game shall notify users of a stalemate. 08/14/08 ChesServe 15