Skip to content
Snippets Groups Projects
Commit c994dbad authored by Trandinh Thien's avatar Trandinh Thien
Browse files

Fixed functional requirements in SRS, added Test report to Functional Requirements in Testplan

parent 4ea69da0
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
......@@ -235,7 +235,10 @@ The following contains the functional requirements of the project:
\item You will be able to select How-To-Play from the main menu
\item You will be able to select exit Game Game from the main menu
\item The game shall be turn-based.
\item A player's turn shall end once all their units have performed available actions or if the game ends.
\item A player's turn shall end once all their units have performed available actions or if the game ends.
\item The game will consist of 2 players alternating turns
\item When one player's turn ends, the next player's turn begins.
\item Each player will receive the same amount of units, and be unable to gain anymore until the next match.
\item A unit shall only be able to move and attack once per turn.
\item During a unit's turn, clicking a unit will give a drop down menu with available actions
\item One side will be victorious when the other side has no playable units left.
......@@ -243,22 +246,23 @@ The following contains the functional requirements of the project:
\subsubsection{Unit Movement}
\begin{enumerate}[resume]
\item Units will be able to select move as an available option after clicking on a unit that has yet to perform its action
\item Units will be able to move within their move range
\item and shall not be able to pass through obstacles.
\item Obstacles on terrain will block units from moving through them.
\item Units will only be able to move within their move range
\item Units shall not be able to pass through obstacles.
\end{enumerate}
\subsubsection{Unit Attacking}
\begin{enumerate}[resume]
\item Units will be able select attack as an available option after clicking on a unit that has not attacked this turn
\item Units will be able select attack as an available option after clicking on a unit that has not attacked this turn, regardless of having moved or not
\item A unit will only be able to attack a unit within it's attack range.
\item All units shall be able to attack enemy units.
\item Units will be unable to move after attacking.
\item Attack information displaying damage, hit rate, and crit rate will be displayed to screen
\item Units will lose HP according to damage calculation.
\item Units that fall below 1 HP will be deceased and no longer be able to be used in the current battle.
\item Player shall be able to select which weapon each unit uses to perform an attack.
\end{enumerate}
\subsubsection{Unit Structure}
\begin{enumerate}[resume]
\item All units shall have a corresponding class.
\item All units shall have a corresponding Unit type class.
\item Classes shall include:
\begin{enumerate}
\item Warriors, which will be physical oriented units with a focus on Strength and Defense.
......
No preview for this file type
File added
......@@ -7,6 +7,7 @@
\usepackage{mdframed}
\usepackage{tabto}
\usepackage{keyval}
\usepackage{verbatimbox}
% ============= Requirements Table =============
\makeatletter
......@@ -23,7 +24,7 @@
\setkeys{test}{#1}
\stepcounter{testNum}
\begin{tabularx}{\textwidth}{|lX|}
\noindent \begin{tabularx}{\textwidth}{|lX|}
\hline
\textbf {Test \arabic{testNum}:} & \textbf{\test@name} \\
\textbf{Type:} & \test@type \\
......@@ -149,14 +150,258 @@ See Gantt Chart at the following url ...
% Use \mbox{,} when you want use a comma
\requirements {
name = Insert Name Here,
type = The game will contain a main menu\mbox{,} with options to select New Game\mbox{,} Load Game\mbox{,} How-To-Play\mbox{,} and Exit Game,
execution = perform here,
initialState = initial state here,
input = input here,
output = output here
name = Game will contain a main menu on screen upon launch.,
type = Structural Dynamic Manual Testing,
execution = Program will be executed\mbox{,} then checked if a main menu appears upon launch.,
initialState = Game is not opened.,
input = Game executable is opened.,
output = Game menu pops up upon launch.
}
\addvbuffer
\requirements {
name = Select New Game from the main menu.,
type = Structural Dynamic Manual Testing,
execution = New game will be selected and checked that a new game instance is formed.,
initialState = Game is currently on main menu.,
input = New game is selected.,
output = New game is started.
}
\addvbuffer
\requirements {
name = Select Load Game from the main menu.,
type = Structural Dynamic Manual Testing,
execution = Load game will be selected and checked if the pre-existing game state is loaded.,
initialState = Structural Dynamic Manual Testing,
input = Load Game is selected.,
output = Previous saved game state is executed.
}
\addvbuffer
\requirements {
name = Select How-To-Play from the main menu.,
type = Structural Dynamic Manual Testing,
execution = How-To-Play will be selected and checked if the How-To-Play menu displays as expected.,
initialState = Game is currently on main menu.,
input = How-To-Play is selected.,
output = How-To-Play is selected.
}
\addvbuffer
\requirements {
name = Select Exit Game from the main menu.,
type = Structural Dynamic Manual Testing,
execution = Exit is selected and checked that the game is closed.,
initialState = Game is currently on main menu.,
input = Exit Game is selected.,
output = Game is closed.
}
\addvbuffer
\requirements {
name = The game is turn-based\mbox{,} and units are only able to move and attack once per player’s turn.,
type = Structural Dynamic Automated Testing,
execution = A user will click on a unit and have it perform its available actions. Immediately after\mbox{,} it will be checked that the same unit is unable to perform any additional actions.,
initialState = Unit X has not performed their action.,
input = Unit X performs their action.,
output = Unit X is no longer able to perform their action.
}
\addvbuffer
\requirements {
name = A player's turn ends once all their units have performed all available actions.,
type = Structural Dynamic Automated Testing,
execution = The available actions of all of Player 1's units will be set to none. Then\mbox{,} it will be checked that Player 1's turn has ended and it is now currently Player 2's turn.,
initialState = Currently is Player 1's turn.,
input = Set all actions of units belonging to Player 1 to none.,
output = Player 1's turn ends\mbox{,} and it is now Player 2's turn.
}
\addvbuffer
\requirements {
name = During a unit's turn\mbox{,} clicking a unit will give a drop down menu with available actions of the unit.,
type = Structural Dynamic Manual Testing,
execution = A unit\mbox{,} which has not already performed an action\mbox{,} will be right-clicked and checked that a drop down menu appears with expected actions of that unit.,
initialState = The unit is alive and has available actions.,
input = The unit is selected.,
output = A drop down menu with expected actions pops up.
}
\addvbuffer
\requirements {
name = One side is victorious when the other side has no playable units left.,
type = Structural Dynamic Automatic Testing,
execution = The status of all live units belonging to Player 2 is set to deceased. It is then checked that the game is over and Player 1 is victorious.,
initialState = Player 1 and Player 2 both have live units.,
input = All live units belonging to Player 2 are killed.,
output = Player 1 is victorious and the game is over.
}
\addvbuffer
\requirements {
name = Player can select move after selecting a unit that has yet to perform its action and opening the drop down menu.,
type = Structural Dynamic Manual Testing,
execution = The unit that has yet to move and is able to move is selected\mbox{,} and it is observed that a pop-up menu containing the "move" action appears.,
initialState = The unit has not yet performed an action\mbox{,} and is available to move if required.,
input = The unit is selected and the drop down menu is opened,
output = Drop down menu containing the option "move" is visible.
}
\addvbuffer
\requirements {
name = Units are only able to move within their move range.,
type = Functional Dynamic Manual testing ,
execution = Attempt to move a unit to a tile outside of its move range. ,
initialState = The unit is alive and able to move.,
input = The unit is asked to move to a different tile outside of its range.,
output = Nothing happens since the requested move is not within the unit's move range.,
}
\addvbuffer
\requirements {
name = Units are not be able to pass through obstacles.,
type = Functional Dynamic Manual Testing,
execution = Attempt to ask the unit to move to an area blocked off by an obstacle.,
initialState = The unit is within range of an area blocked off by an impassable obstacle.,
input = Ask unit to move to the area past the obstacle.,
output = Unit is unable to move to the requested area.
}
\addvbuffer
\requirements {
name = Player can select attack as an available option after selecting a player-owned unit that has not attacked and an enemy unit is within attack range.,
type = Structural Dynamic Manual Testing,
execution = The owned unit that has yet to attack is selected\mbox{,} and it is observed that a pop-up menu containing the "attack" action appears.,
initialState = The player's unit has not yet performed an attack\mbox{,} and an enemy unit is within its attack range.,
input = The unit is selected and the drop down menu is opened.,
output = Drop down menu containing the option "attack" is visible.
}
\addvbuffer
\requirements {
name = Unit may only attack an opposing unit within its attack range.,
type = Functional Dynamic Automatic Testing,
execution = An automated test attempts to ask the program to make a unit attack an enemy unit outside of its attack range.,
initialState = The unit that is available to attack and its enemy unit are not within attack range of each other.,
input = The unit available to attack will attempt to attack the enemy unit.,
output = Nothing will happen\mbox{,} as the attempted attack is not valid due to the fact that the enemy unit is out of range.
}
\addvbuffer
\requirements {
name = All playable units can attack enemy units.,
type = Functional Dynamic Automatic Testing,
execution = Automated tests check that all units have required states and functions that allow it to attack enemy units.,
initialState = Units are initialized.,
input = Units are initialized.,
output = All units have required states and functions that allow them to attack enemy units.
}
\addvbuffer
\requirements {
name = Units are unable to move after attacking.,
type = Structural Dynamic Manual Testing,
execution = Attempt to activate the drop down menu to move the unit upon an owned unit that has already acted within the turn.,
initialState = The unit has already completed an action for the current turn.,
input = A player attempts to activate the drop down menu to move a character after attacking.,
output = Drop down menu will not appear.
}
\addvbuffer
\requirements {
name = Units will lose HP according to damage calculations.,
type = Functional Dynamic Automatic Testing,
execution = Automated tests will check that damage modifying the character HP\mbox{,} calculated through the damage calculation class\mbox{,} is consistent with the expected value.,
initialState = The unit is alive and able to take damage.,
input = The unit takes damage.,
output = The HP lost by the unit should correspond to what is calculated during the damage calculation step.
}
\addvbuffer
\requirements {
name = Units that are deceased are no longer active in the current battle.,
type = Functional Dynamic Automatic Testing,
execution = Automated test modifies a unit's HP to 0.,
initialState = The unit has more then 1 HP and is valid in battle.,
input = The unit's HP is set to 0.,
output = The unit's state shall reflect that it is no longer valid in the battle and can no longer be used in the game.
}
\addvbuffer
\requirements {
name = Player can select which weapon each unit uses to perform an attack.,
type = Structural Dynamic Manual Testing,
execution = Attempt to change weapons by selecting weapons from the unit drop down menu on a playable unit that has yet to move\mbox{,} select a different weapon \mbox{,} and observe if attack stats has changed in accordance to the newly selected weapon.
initialState = A unit is available to perform an action.,
input = Attempt to change the unit's weapon,
output = The unit changes weapons and gains different stat modifiers in accordance to the new weapon.
}
\addvbuffer
\requirements {
name = All units shall have a corresponding unit class.,
type = Functional Static Automatic Testing,
execution = Automated tests check that units have a corresponding unit type class that is viable in the game.,
initialState = All units are instantiated.,
input = All units are instantiated.,
output = All classes correspond to a viable unit type class.
}
\addvbuffer
\requirements {
name = All units have stat values corresponding to their class.,
type = Functional Static Automatic Testing,
execution = Automated tests check that a unit's stat correctly corresponds to the pre-determined stats of the specific unit class.,
initialState = All units are instantiated.,
input = All units are instantiated.,
output = All units have stats that correspond to their class.
}
\addvbuffer
\requirements {
name = Classes include warrior\mbox{,} mage\mbox{,} and archer.,
type = Functional Static Automatic Testing,
execution = Automated tests check for the existence of all three classes in the program by instantiating units for all three classes.,
initialState = All three classes are existent in the game.,
input = Units of all three classes are instantiated.,
output = Units of all three classes exist and are of the corresponding class.
}
\addvbuffer
\requirements {
name = The stats of the game include Str\mbox{,} Int\mbox{,} Def\mbox{,} Res\mbox{,} Skill\mbox{,} Speed\mbox{,} and HP.,
type = Functional Static Automatic Testing,
execution = Automated tests check that a unit has all of the listed stats.,
initialState = A unit is instantiated.,
input = A unit is instantiated.,
output = The unit owns all listed stats.
}
\subsubsection{Area of Testing2}
...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment