1 \subsection{Preflight checklist
}
3 Before actual certification is commenced we perform a manual test using a
5 If any of the checks fail we immediately reject the product.
6 The checklist is given in the table below. All commands in
\texttt{monospace
}
7 are to be run in a terminal. Commands prefixed with a
\texttt{\#
} should be run
8 with root permissions. Commands prefixed with a
\texttt{\$
} should be run with
12 \begin{tabularx
}{\linewidth}{|l|X|
}
14 Check
1 & Get the SUT in a workable state. \\
18 \item Import the VirtualBox image into VirtualBox.
20 \item Verify the SUT booted successfully and the network modules
23 \hline Passed &
\textit{Yes/No
} \\
25 Check
2 & Verify the SUT is complete. \\
\hline
28 \item Boot the SUT as in
\emph{Check
1}.
29 \item Verify the loopback device exists by running
31 \item Verify the
\emph{echo-server
} is present on the system.
32 \item Verify
\emph{Scapy
} is present on the system by running
34 \item Verify all scripts used for testing are present on the
38 Passed &
\textit{Yes/No
}\\
40 Check
3 & Initialize the testing environment.\\
44 \item Boot the SUT as in
\emph{Check
1}.
45 \item Setup iptables by executing
46 \texttt{\# code/iptables.sh
}~
\footnote{ The IPTables script
47 ensures that the OS does not drop packets due to an the
49 \item Navigate to the working directory by running
50 \texttt{\$ cd /home/student/tt2015
}
51 \item Compile the echo server by running
52 \texttt{\# cd code/server \&\& make \&\& cd -
}
53 \item Start the echo server by running
54 \texttt{\# cd code/server \&\& java Main
}
57 Passed &
\textit{Yes/No
}\\
59 Check
4 & Test the tool environment.\\
63 \item Initialize the SUT as in
\emph{Check
3}
64 \item Execute the test script by running
65 \texttt{\# code/client/helloworld.py
}.
66 \item Verify the console displays a success message.
69 Passed &
\textit{Yes/No
}\\
71 Check
5 & All test inputs and scripts are present. \\
\hline
72 % DIT MOET NOG EVEN ANDERS
75 \item Boot the SUT as in
\emph{Check
1}.
76 \item Execute the command
\texttt{ls scripts/tests
}
77 \item Verify that there is a file named case$X$ for each test case $X$
78 \item Use
\emph{ls packets
}
79 \item Verify that there is a file named
\texttt{single.pcap
} and
83 Passed &
\textit{Yes/No
}\\
90 \subsection{Testing of SUT
}
91 The SUT is a series of services for other computer programs with no end-user
92 facing interface. Therefore the SUT will be tested solely by calling it's
93 services through various automated scripts. An automated test suite will be
94 available which executes all these automated scripts and aggregates their
95 results to asses whether or not the SUT has passed the test.
97 The implementation of the SUT is tested using black box testing techniques. A
98 series of tests asses the correctness of the implementation with regards to the
99 TCP specification. These tests are specified in Table~
\textbf{referentie naar
100 tests-tabel
}. The test cases aim to cover the most interesting parts of the TCP
103 To cover the TCP specification as complete as possible while still maintaining
104 a feasible test suite the tests are divided into equivalence partitions. Below
105 these partitions are given.
108 \item \emph{Number of packets
} in request~
\footnote{A request is considered
109 establishing a connection (handshake) and a number of payload packets
}
111 \item 0 payload packets
112 \item 1 payload packet
113 \item n=small payload packets
114 \item n=big payload packets
116 \item Correct or incorrect
\emph{source port
}
117 \item Correct or incorrect
\emph{destination port
}
118 \item Bits flipped in
\emph{payload
}
120 \item Correct payload
121 \item Payload with even number of bits flipped
122 \item Payload with odd number of bits flipped
124 \item Correct or Incorrect
\emph{checksum
}
125 \item Packets received in or out of order, or missing packets
128 \textbf{hier iets over waarom deze partities relevant zijn! Waarom odd en
129 even number of bits flipped bijv interessant?
}
132 Partitions
2 to
6 are tested using pairwise testing to keep the number of test
133 cases feasible. The pairs are then all *except some where it does not make sense
134 to do so) tested with the different request sizes of partition
1.
136 This is expressed in Table~
\ref{table:testpairs
}.
139 % DIT MAAK IK NOG EVEN MOOI
140 \begin{tabularx
}{\linewidth}{p
{2cm
} | l | p
{2cm
} | l | p
{1cm
} || c | c | p
{1.3cm
} | p
{1.3cm
}}
141 \textbf{Payload
} &
\textbf{checksum
} &
\textbf{destination port
} &
\textbf{order
} &
\textbf{source port
} &
\textbf{payload
0} &
\textbf{payload
1} &
\textbf{payload small
} &
\textbf{payload big
} \\
\hline \hline
142 Correct & Correct & Correct & In order & Correct &
\checkmark &
\checkmark &
\checkmark &
\checkmark \\
\hline
143 Correct & Incorrect & Incorrect & Missing packet & Incorrect &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
144 odd\# of bits flipped & Correct & Incorrect & Out of order & Incorrect &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
145 odd\# of bits flipped & Incorrect & Correct & Missing packet & Correct &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
146 even\# of bits flipped & Correct & Incorrect & Missing packet & Correct &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
147 even\# of bits flipped & Incorrect & Correct & Out of order & Incorrect &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
148 odd\# of bits flipped & Incorrect & Incorrect & In order & Incorrect &
\checkmark &
\checkmark &
\checkmark &
\checkmark \\
\hline
149 even\# of bits flipped & Incorrect & Incorrect & In order & Incorrect &
\checkmark &
\checkmark &
\checkmark &
\checkmark \\
\hline
150 Correct & Incorrect & Incorrect & Out of order & Correct &
\xmark &
\xmark &
\checkmark &
\checkmark \\
152 \caption{Combinations of test cases
}
153 \label{table:testpairs
}
156 \subsection{Quality, completeness and coverage of tests
}
158 The network packets used in testing are constructed from prerecorded, known to
159 be correct, network traffic. These packets are then modified with well used and
160 field tested tools. Due to this the chance of errors in the test cases is quite
161 low. However, no formal proof of correctness of the test cases is present, this
162 means that any defects found might not be the result of a fault in the SUT.
163 Therefore detected defects should only indicate there is a high chance that
164 there is a fault in the SUT and can not result directly in the conclusion that
165 there actually is one.
169 Due to the nature of black-box testing coverage of the code in the
170 implementation of the SUT is unknown. However completeness of the tests over
171 the specification of the SUT can be assessed.
175 Due to the clear and exhaustive specification of TCP the completeness of the
176 test suite can be clearly assessed.
178 As always, $
100\%$ completeness is not feasible, therefore test cases are
179 carefully selected to cover the most interesting parts of the TCP specification
180 to ensure a test suite.
182 To further decrease the number of tests needed test cases are divided into
183 equivalence partitions and the combination of cases as described in
184 Table~
\ref{table:testpairs
} ensures that all partitions are
185 covered and the number of individual tests is still feasible.
189 % wat ik ook probeer ik krijg de eerste collum
190 % zijn tekst niet verticaal gecentered
194 \subsection{Test cases
}
197 %\begin{tabularx}{\linewidth}{| l | X|}
200 %Title & Single valid request. \\\hline
201 %Input & Pcap file with prerecorded valid packets. \\\hline
202 %Expected output & Pcap file with valid response to request. \\\hline
203 %Course of action & \begin{enumerate}
204 % \item Execute \emph{./scripts/tests/case1-single-valid.sh}
205 % \item Load \emph{output/case1.pcap} with ...
206 %\end{enumerate} \\\hline
207 %Valid trace & \begin{enumerate}
208 % \item \textbf{Hier packets benoemen?}
209 %\end{enumerate} \\\hline
212 %\begin{tabularx}{\linewidth}{| l | X|}
215 %Title & Single request with corrupted checksum. \\\hline
216 % Input & Pcap file used as \emph{test-case 1} input. \\\hline
217 % Expected output & No response from SUT, logs with rejected packets. \\\hline
218 % Course of action & \begin{enumerate}
219 % \item Load input pcap file into ....
220 % \item Corrupt checksum of loaded packets.
221 % \item Save resulting packets as pcap file.
222 % \item Load new pcap file into ...
223 % \item Replay new pcap file.
224 % \item Record SUT response using...
225 % \item Extract log with rejected packets.
226 % \item Save recorded packets as a pcap file.
227 % \item Analyze packets in resulting file.
228 % \end{enumerate} \\\hline
229 % Valid trace & \begin{enumerate}
230 % \item \textbf{Aangeven welke packets corrupted zijn?}
231 % \end{enumerate} \\\hline