Table Description: Each record of the table refers to a user created game session. This table will be viewable from the 'Session' page of the site, allowing users to reference which game to try and join.
Fields:
RoomID
: Short code representing game session. This will be created by the web application. This is the primary key.RoomTitle
: A brief description provided by the user which creates a new game session, used to help other users identify where to go. This field cannot be null.HostName
: Name entered by user who created game session, and will be associated with 'Player1' in the 'PlayerRosters' table. This field cannot be null.Players
: Number of active players in game session. Max of four. This field cannot be null and must be a positive integer.Constraints:
RoomID
must be unique.RoomTitle
, HostName
, and Players
cannot be null.Players
must be a positive integer.Relationships:
PlayerRosters
table. One PlayerRosters
record is associated with one ActiveSessions
record.Description: This method creates a new game session and adds it to the ActiveSessions table.
Parameters: HostName, RoomTitle
Return Values: RoomID of the new game session.
Description: This method allows a user to join an existing game session.
Parameters: RoomID, PlayerName
Return Values: Success message if the player was added to the game session, error message if the game session is full.
Description: Test session creation
Preconditions: So long as the session page is available
Test Steps:
Expected Result: The user will become the host of a new game session
Status: Pass
Postconditions:
Description: Refuse to create a new game when fields are not filled.
Preconditions: User selects to create a game, but required fields are not populated.
Test Steps:
Expected Result: The user will be denied, and informed of the needed text.
Status: Fail
Postconditions: Text will generate within the 'create game' box to inform the user of the need to include the required fields.
ActiveSessions
table to display all active game sessions. It will use the CreateGameSession
and JoinGameSession
methods to create and join game sessions.Description: Test that the session page displays the correct data from the ActiveSessions
table.
Preconditions: The ActiveSessions
table has at least one record.
Test Steps:
Expected Result: All active game sessions from the ActiveSessions
table are displayed on the session page.
Status: Pass
Postconditions: The session page displays the correct data from the ActiveSessions
table.
Table Description: When a user enters a room id and provides a player name to join a game, it will be added to this table, along with the associated room id. This will be used to distringuish which user is in what player slot, and will be associated to the Players field in the ActiveSessions table. A game's player names are visible in a game session.
Fields:
RoomID
: Short code representing game session. This will be created by the web application. This is the primary key to associate a particular session in the ActiveSessions
table.Player1
: Name of the first player in the game session. This field cannot be null.Player2
: Name of the second player in the game session. This field can be null if there are less than two players.Player3
: Name of the third player in the game session. This field can be null if there are less than three players.Player4
: Name of the fourth player in the game session. This field can be null if there are less than four players.Constraints:
RoomID
must be unique.Player1
cannot be null.Player2
, Player3
, and Player4
can be null.Relationships:
ActiveSessions
table. One PlayerRosters
record is associated with one ActiveSessions
record.Description: This method adds a new player to an existing game session.
Parameters: RoomID, PlayerName
Return Values: Success message if the player was added to the game session, error message if the game session is full or has already started.
Description: Validate that additional users can join a game
Preconditions: Session page is available, and an active game session already exists
Test Steps:
Expected Result: The user will be a player in the same game as the host.
Status: Pass
Postconditions:
Description: Refuse to add a player to a game session with no available room.
Preconditions: Session page is available, and an active game session already exists, but has four players.
Test Steps:
Expected Result: The user will be denied, and informed that the room cannot be entered.
Status: Fail
Postconditions: Text will generate within the 'join a game' box to inform the user that 'This room cannot be entered'.
Description: Refuse to add a player to a game session which has begun play.
Preconditions: Session page is available, and an active game session already exists, but has already started.
Test Steps:
Expected Result: The user will be denied, and informed that the room cannot be entered.
Status: Fail
Postconditions: Text will generate within the 'join a game' box to inform the user that 'This room cannot be entered'.
Description: Refuse to add a player to a game session without player name and RoomID.
Preconditions: Session page is available, but the user never entered the required information.
Test Steps:
Expected Result: The user will be denied, and informed that the required fields must be filled out.
Status: Fail
Postconditions: Text will generate within the 'join a game' box to inform the user of the need to include the required fields.
Description: Refuse to add a player to a game session when the provided RoomID is not within the ActiveSessions table.
Preconditions: Session page is available, but the user provided RoomID does not correspond to an active option.
Test Steps:
Expected Result: The user will be denied, and informed that the room cannot be entered.
Status: Fail
Postconditions: Text will generate within the 'join a game' box to inform the user that 'This room cannot be entered'.
PlayerRosters
table to display all players in a game session. It will use the AddPlayer
method to add players to a game session.Description: Test that the session page displays the correct data from the PlayerRosters
table.
Preconditions: The PlayerRosters
table has at least one record.
Test Steps:
Expected Result: All players in a game session from the PlayerRosters
table are displayed on the session page.
Status: Pass
Postconditions: The session page displays the correct data from the PlayerRosters
table.
Table Description: Once a winner is declared in a game, the game's session will be considered "completed". A copy of the record from 'ActiveSessions' will be stored here, and will be made viewable to users from the 'Session' page of the site - positioned somewhat below the table of 'ActiveSessions'. This table will allow users to observe the play history of the site, and the winner of a particular game.
Fields
RoomID
: Short code representing game session. This will be created by the web application.RoomTitle
: A brief description provided by the user which creates a new game session, used to help other users identify where to go.HostName
: Name entered by user who created game session, and will be associated with 'Player1' in the 'PlayerRosters' table.Players
: Number of active players in game session. Max of four.Winner
: This field will be added to the information provided by the record coming from the 'ActiveSessions' table. Only when a game is completed and victory is awarded will a name be presented here. Otherwise, it will indicate that there was not a winner.Constraints:
RoomID
must be unique.Player1
cannot be null.Player2
, Player3
, and Player4
can be null.Relationships:
ActiveSessions
table and PlayerRosters
. Session information comes from ActiveSessions
, while the game winner comes from the PlayerRosters
table.Description: Once a game is completed, the record in ActiveSessions and the player name of the winner should be used to generate a new record in GameHistory.
Parameters: RoomID, PlayerName
Return Values: Success message if the player was added to the game session, error message if the game session is full or has already started.
Description: A new GameHistory record is produced from a completed game.
Preconditions: A game with at least two players has a winner declared.
Test Steps:
Expected Result: A row in the GameHistory Table with correct information will be added.
Status: Pass
Postconditions: Viewing the session page will include a new row at the top of the printed table. The values included in the new row will match what was available from ActiveSessions. There will also be a field for the winner of the completed game, and the value listed will match the provided player name from the game session.
Description: An active game session fails to complete, and is not added to GameHistory table.
Preconditions: A game with at least one player fails to complete within a preset time limit.
Test Steps:
Expected Result: The game will cease to be available to join, but there will be no new history record.
Status: Fail
Postconditions: Viewing the session page will not include the new row at the top of the printed table. Entering the RoomID in the 'join a game' box will result in the same denial as a not active room.
GameHistory
table to display result from completed games.Description: Test that the session page displays the correct data from the GameHistory
table.
Preconditions: The GameHistory
table has at least one record.
Test Steps:
Expected Result: All completed games in the GameHistory
table are displayed on the session page.
Status: Pass
Postconditions: The session page displays the correct data from the GameHistory
table.