Skip to content
Snippets Groups Projects
Commit a8228d85 authored by Hameed Andy's avatar Hameed Andy
Browse files

Section 4 added: POC testing

parent 3968a325
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -3,11 +3,12 @@
\usepackage{booktabs}
\usepackage{tabularx}
\usepackage{hyperref}
\usepackage{amsmath}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=red,
linkcolor=black,
urlcolor=blue
}
\usepackage[round]{natbib}
......@@ -37,7 +38,7 @@
\begin{tabularx}{\textwidth}{p{3cm}p{2cm}X}
\toprule {\bf Date} & {\bf Version} & {\bf Notes}\\
\midrule
Date 1 & 1.0 & Notes\\
10/25/2018 & 1.0 & Andy added section 4.0\\
Date 2 & 1.1 & Notes\\
\bottomrule
\end{tabularx}
......@@ -47,8 +48,6 @@ Date 2 & 1.1 & Notes\\
\pagenumbering{arabic}
This document ...
\section{General Information}
\subsection{Purpose}
......@@ -284,42 +283,72 @@ How test will be performed:
\section{Tests for Proof of Concept}
\subsection{Area of Testing1}
\subsection{Snake Dynamics}
\paragraph{Title for Test}
\paragraph{Snake Movement and Speed}
\begin{enumerate}
\item{test-id1\\}
\item{T1D1\\}
Type: Functional, Dynamic, Manual, Static etc.
Type: Dynamic
Initial State:
Initial State: The snake body - graphically represented by a red square - is initially motionless. It exists somewhere within the frame of the window.
Input:
Input: Keyboard Event - user clicks on one of the directions on the keyboard arrow pad.
Output:
Output: Snake moves according to the direction chosen. This can logically represented by the expression keyboardEvent.direction == snakeMovementDirection. Note that the variables used are arbitrary and are dependant on Python syntax.
How test will be performed:
How test will be performed:
\begin{itemize}
\item A method will be created under the POC test class where the keyboard event is manually set to the code representing each of the directions on the arrow keypad - up, down, left and right. The direction inserted will be asserted equal to the direction of the moving snake, set by some variable.
\item After starting the game, the user will click on each one of the four directions and verify whether or not the snake is moving in the corresponding direction, using the graphical interface created with Pygame.
\end{itemize}
\item{T1D2\\}
Type: Dynamic, Functional testing
\item{test-id2\\}
Type: Functional, Dynamic, Manual, Static etc.
Initial State: The snake body - graphically represented by a red square - is initially motionless. It exists somewhere within the frame of the window.
Initial State:
Input: Keyboard Event - user clicks on one of the directions on the keyboard arrow pad.
Input:
Output: Snake moves accurately according to the speed set in the snake module. Statically, this can represented for the vertical movement of the snake by this expression:
\begin{align*}
(snakeFinalPosition - snakeInitPosition) == (speed \times timeElapsed)*vel
\end{align*}
where vel is the distance defined for 1 single step and speed is the delay between each step in milliseconds
How test will be performed: A method will be created under the POC test class where the keyboard event is manually set to the code representing each of the directions on the arrow keypad - up, down, left and right. The logical expression above is implemented into an assert statement verifying that the distance moved corresponds to the speed and velocity that were used as well as the time that has elapsed - this can be obtained from the time object in Pygame.
\end{enumerate}
\subsection{Integration and System Testing}
\begin{enumerate}
\item{T1D3\\}
Type: Integration, System testing
Output:
Initial State: The game menu is loaded onto the window with options for starting the game and quitting the game.
How test will be performed:
Input: The following sequence of inputs
\end{enumerate}
\begin{enumerate}
\item User clicks start game
\item Keyboard Event - user clicks on one of the directions on the keyboard arrow pad.
\item user exits the window by clicking the exit tab on the top right corner of the screen
\end{enumerate}
\subsection{Area of Testing2}
Output: Snake game runs as intended. The "start game" option leads the user to the game screen where the snake body sits motionless. The user moves the snake body using the keyboard arrow pad, moving in directions that correspond apprioriately to the arrows clicked and in the correct sequence. The game window is closed once the user clicks the exit button on the top right corner.
How test will be performed: Several peers will be asked to test the game from start to finish for this integration and system test.
...
\end{enumerate}
\section{Comparison to Existing Implementation}
......@@ -329,9 +358,6 @@ How test will be performed:
\subsection{Unit testing of output files}
\bibliographystyle{plainnat}
\bibliography{SRS}
\newpage
......
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