Add description of what is tested
[tt2015.git] / a2 / 1cases.tex
index d84752a..14900c9 100644 (file)
@@ -35,7 +35,7 @@ user permissions.
        \hline\hline
        Check 3 & \multicolumn{2}{l|}{Initialize the testing environment..}\\
        \hline
-       \multirow{5}{*}{Course of action}
+       \multirow{6}{*}{Course of action}
                & 1. & Boot the SUT as in \emph{Check 1}.\\
                & 2. & Setup iptables by executing
                        \texttt{\# code/iptables.sh}~\footnote{The IPTables script ensures
@@ -43,9 +43,11 @@ user permissions.
                & 3. & Navigate to the working directory by running
                        \texttt{\$ cd /home/student/tt2015}\\
                & 4. & Compile the echo server by running 
-                       \texttt{\# cd code/server \&\& make \&\& cd -}\\
+                       \texttt{\# cd code/server \&\& make}\\
                & 5. & Start the echo server by running
                        \texttt{\# cd code/server \&\& java Main}\\
+               & 6. & Generate all test cases by running
+                       \texttt{\$ python code/client/gen.py}\\
        \hline
        Passed & \multicolumn{2}{l|}{\textit{Yes/No}}\\
        \hline\hline
@@ -80,10 +82,19 @@ results to asses whether or not the SUT has passed the test.
 
 The implementation of the SUT is tested using black box testing techniques. A
 series of tests asses the correctness of the implementation with regards to the
-TCP specification. These tests are specified in Table~\textbf{referentie naar
-tests-tabel}. The test cases aim to cover the most interesting parts of the TCP
+TCP specification. These tests are specified in Table~\ref{tbl:testpairs}. The test cases aim to cover the most interesting parts of the TCP
 specification. 
 
+In this test suite the behavior of the outwards (network) interface of the SUT
+is assessed. This is, the behavior of the SUT as
+observed by another system on the network trying to communicate with (a system
+running on the same host as the SUT using) the SUT. This is achieved by running
+man 
+echo-server on the system which runs the SUT (a virtual machine) which
+echos back all messages received to the sender. The test scripts will send
+packets to the echo-server and then checks the received
+response to asses whether or not the SUT is preforming as expected.
+
 To cover the TCP specification as complete as possible while still maintaining
 a feasible test suite the tests are divided into equivalence partitions. Below
 these partitions are given.
@@ -130,6 +141,10 @@ these partitions are given.
 These partitions were chosen since they correspond to key parts of the TCP
 specification. 
 
+%
+% één na laatste packket, moet dit B+3 of B+2 zijn?
+%
+
 TCP segments are send over a TCP connection from a \emph{source} to a \emph{destination port}. Therefore segments which are received that have a 
 source or destination port set to an incorrect value should not be regarded
 as segments belonging to the connection by the SUT. 
@@ -148,13 +163,26 @@ The SUT should exhibit the same behavior and accept packets where these type
 of bit errors occur.
 
 TCP guarantees that segments are delivered \emph{in order}
-,even when they are received
+, even when they are received
 out of order and that missing segments are resend. The SUT should
 exhibit the same behavior. If segments are received out of order it should
 either reassemble them when the missing packet has arrived or request them to
 be resend when the  Missing segments should be re-requested (by ACK-ing
 the correct sequence number).  
 
+A single request consists of a number of packets that sent a
+to the \emph{echo-server} and back. The TCP specification state that such a
+transaction requires the following messages.
+
+\begin{center}
+       Script $-$ SYN $A$ $\rightarrow$ SUT \\
+       Script $\leftarrow$ SYN-ACK $(A+1)$ $B$ $-$ SUT \\
+       Script $-$ ACK $(A+1)$ $(B+1)$ $\rightarrow$ SUT \\
+       Script $-$ ACK-PUSH $(A+1)$ $(B+2)$ \emph{msg} $\rightarrow$ SUT \\
+       Script $\leftarrow$ ACK $(A+2+msg_{length})$ $(B+3)$ $-$ SUT \\
+       Script $\leftarrow$ ACK-PUSH $(A+2+msg_{length})$ $(B+3)$ \emph{msg} $-$ SUT
+\end{center}
+
 \bigskip
 
 Partitions 2 to 6 are tested using pairwise testing to keep the number of test
@@ -258,7 +286,7 @@ The we do the preflight checks as defined in Table~\ref{tbl:preflight}.
 \subsubsection{Test Cases}
 If the SUT passes the preflight checks the actual test cases can be executed.
 Table~\ref{tbl:testcases} shows the expected results of each of the test cases
-described in Table~\ref{table:testpairs}. 
+described in Table~\ref{tbl:testpairs}. 
 
 \setcounter{TCC}{1}
 \begin{table}[H]
@@ -296,25 +324,16 @@ described in Table~\ref{table:testpairs}.
                corrupted is received for each consecutive segment send.\\  \hline
        \doTCC & The ACK\# for the SEQ\# of the first segments which is
                corrupted is received for each consecutive segment send.\\ \hline
-       \hline
     \end{tabular}
 \caption{Expected results of test cases}
-\label{table:preflightresults}
+\label{tbl:testcases}
 \end{table}
 
-% Bij Ramons aanwezigheid
+% Bij Ramons afwezigheid
 % Paul Vitero (linkerkant lange gang)
 % verdieping Mercator
 
-%Before every test case use the following steps to initialize the testing environment.
-%
-%\begin{enumerate}
-       %\item Boot the vm using VirtualBox.
-       %\item Setup iptables by executing \texttt{\# code/iptables.sh}
-       %\item Navigate to the working directory by running \texttt{\$ cd /home/student/tt2015}
-       %\item Start the echo server by running \texttt{\# cd code/server \&\& java Main}
-%\end{enumerate}
-%
+
 %\begin{longtable}{|p{.2\linewidth}|p{.8\linewidth}|}
        %\hline
        %Nr & 1 \\\hline
@@ -367,6 +386,28 @@ described in Table~\ref{table:testpairs}.
        %& 2. Execute the script by running \texttt{\# code/client/tests/5.py} \\\hline
        %Valid trace & Verify that the script prints 'Success'. \\\hline
        %\hline
+%      
+       %Nr & 6 \\\hline
+       %Title & Request with corrupted source port. \\\hline
+       %Input & Generated packets with 1byte payload, in these packets the source port number is increased by one. \\\hline
+       %Expected output & - \\\hline
+       %\multirow{2}{*}{Course of action}
+       %& 1. Use the steps listed above in order to start the SUT. \\
+       %& 2. Execute the script by running \texttt{\# code/client/tests/6.py} \\\hline
+       %Valid trace & Verify that the script prints 'Success'. \\\hline
+       %\hline
+%      
+%      
+       %Nr & 6 \\\hline
+       %Title & Request with corrupted destination port. \\\hline
+       %Input & Generated packets with 1byte payload, in these packets the destination port number is increased by one. \\\hline
+       %Expected output & - \\\hline
+       %\multirow{2}{*}{Course of action}
+       %& 1. Use the steps listed above in order to start the SUT. \\
+       %& 2. Execute the script by running \texttt{\# code/client/tests/6.py} \\\hline
+       %Valid trace & Verify that the script prints 'Success'. \\\hline
+       %\hline
+%      
 %\end{longtable}
 
 %\begin{tabularx}{\linewidth}{| l | X|}