1 \subsection{Preflight checklist
}
2 Before actual certification is commenced we perform a manual test using a
4 If any of the checks fail we immediately reject the product.
5 The checklist is given in the table below. All commands in
\texttt{monospace
}
6 are to be run in a terminal. Commands prefixed with a
\texttt{\#
} should be run
7 with root permissions. Commands prefixed with a
\texttt{\$
} should be run with
10 \begin{longtable
}{|l|rp
{.8\linewidth}|
}
12 Check
1 &
\multicolumn{2}{l|
}{Get the SUT in a workable state.
}\\
14 \multirow{3}{*
}{Course of action
}
15 &
1. & Import the VirtualBox image into VirtualBox.\\
17 &
3. & Verify the SUT booted successfully and the network modules are
20 Passed &
\multicolumn{2}{l|
}{\textit{Yes/No
}}\\
22 Check
2 &
\multicolumn{2}{l|
}{Verify the SUT is complete.
}\\
24 \multirow{5}{*
}{Course of action
}
25 &
1. & Boot the SUT as in
\emph{Check
1}.\\
26 &
2. & Verify the loopback device exists by running
27 \texttt{\$ ifconfig
}.\\
28 &
3. & Verify the
\emph{echo-server
} is present on the system by running
29 \texttt{\$ file code/server/Main.java
}\\
30 &
4. & Verify
\emph{Scapy
} is present on the system by running
32 &
5. & Verify all scripts used for testing are present on the system.\\
34 Passed &
\multicolumn{2}{l|
}{\textit{Yes/No
}}\\
36 Check
3 &
\multicolumn{2}{l|
}{Initialize the testing environment..
}\\
38 \multirow{5}{*
}{Course of action
}
39 &
1. & Boot the SUT as in
\emph{Check
1}.\\
40 &
2. & Setup iptables by executing
41 \texttt{\# code/iptables.sh
}~
\footnote{The IPTables script ensures
42 that the OS does not drop packets due to an the unknown source.
}\\
43 &
3. & Navigate to the working directory by running
44 \texttt{\$ cd /home/student/tt2015
}\\
45 &
4. & Compile the echo server by running
46 \texttt{\# cd code/server \&\& make \&\& cd -
}\\
47 &
5. & Start the echo server by running
48 \texttt{\# cd code/server \&\& java Main
}\\
50 Passed &
\multicolumn{2}{l|
}{\textit{Yes/No
}}\\
52 Check
4 &
\multicolumn{2}{l|
}{Test the tool environment.
}\\
54 \multirow{3}{*
}{Course of action
}
55 &
1. & Initialize the SUT as in
\emph{Check
3}\\
56 &
2. & Execute the test script by running
57 \texttt{\# code/client/helloworld.py
}\\
58 &
3. & Verify the console displays a success message.\\
60 Passed &
\multicolumn{2}{l|
}{\textit{Yes/No
}}\\
62 Check
5 &
\multicolumn{2}{l|
}{All test inputs and scripts are present.
}\\
64 \multirow{2}{*
}{Course of action
}
65 &
1. & Boot the SUT as in
\emph{Check
1}.\\
66 &
2. & Verify that the test generation script is present by running
67 \texttt{\$ file code/client/test.py
}\\
69 Passed &
\multicolumn{2}{l|
}{\textit{Yes/No
}}\\
71 \caption{Preflight checklist
\label{tbl:preflight
}}
74 \subsection{Testing of SUT
}
75 The SUT is a series of services for other computer programs with no end-user
76 facing interface. Therefore the SUT will be tested solely by calling it's
77 services through various automated scripts. An automated test suite will be
78 available which executes all these automated scripts and aggregates their
79 results to asses whether or not the SUT has passed the test.
81 The implementation of the SUT is tested using black box testing techniques. A
82 series of tests asses the correctness of the implementation with regards to the
83 TCP specification. These tests are specified in Table~
\textbf{referentie naar
84 tests-tabel
}. The test cases aim to cover the most interesting parts of the TCP
87 To cover the TCP specification as complete as possible while still maintaining
88 a feasible test suite the tests are divided into equivalence partitions. Below
89 these partitions are given.
92 \item \emph{Number of packets
} in request~
\footnote{A request is considered
93 establishing a connection (handshake) and a number of payload packets
}
95 \item 0 payload packets
96 \item 1 payload packet
97 \item n=small payload packets
98 \item n=big payload packets
100 \item \emph{source port
}
105 \item \emph{destination port
}
110 \item Bits flipped in
\emph{payload
}
112 \item Correct payload
113 \item Payload with bit flips
114 \item Payload with odd number of bits flipped
116 \item \emph{checksum
}
125 \item Missing packets
129 These partitions were chosen since they correspond to key parts of the TCP
132 TCP segments are send over a TCP connection from a
\emph{source
} to a
\emph{destination port
}. Therefore segments which are received which have a
133 source or destination port set to an incorrect value should not be regarded
134 as segments belonging to the connection.
136 TCP uses a
\emph{checksum
} to catch any error introduced in headers, when this
137 checksum does not match the actual computed checksum the packet should be
140 The TCP checksum is also an inherently weak one, as it is simply the
141 bitwise negation of the addition in ones complement arithmetic
142 of all
16 bit words in the header and data of the segment (excluding the
143 header). Therefore any bit error where the ones complement value of one word
144 increases by one, and the value of another decreases by one, is undetected.
145 The SUT should exhibit the same behavior and accept packets where these type
148 \textbf{hier iets over waarom deze partities relevant zijn! Waarom odd en
149 even number of bits flipped bijv interessant?
}
152 Partitions
2 to
6 are tested using pairwise testing to keep the number of test
153 cases feasible. The pairs are then all *except some where it does not make sense
154 to do so) tested with the different request sizes of partition
1.
156 This is expressed in Table~
\ref{table:testpairs
}.
160 \begin{tabular
}{|l|l|l|l|l|l|l|l|l|l|l|
}
162 &
\multicolumn{10}{c|
}{\textbf{Partition
}}\\
164 & \# &
4 &
5 &
3 &
6 &
2 &
1a &
1b &
1c &
1d\\
166 \multirow{9}{*
}{Instance
}
167 &
1 & a & a & a & a & a &
\checkmark &
\checkmark &
\checkmark &
\checkmark\\
168 &
2 & a & b & b & c & b &
\xmark &
\xmark &
\checkmark &
\checkmark\\
169 &
3 & c & a & b & a & b &
\xmark &
\xmark &
\checkmark &
\checkmark\\
170 &
4 & c & b & a & c & a &
\xmark &
\xmark &
\checkmark &
\checkmark\\
171 &
5 & b & a & b & c & a &
\xmark &
\xmark &
\checkmark &
\checkmark\\
172 &
6 & b & b & a & b & b &
\xmark &
\xmark &
\checkmark &
\checkmark\\
173 &
7 & c & b & b & a & b &
\checkmark &
\checkmark &
\checkmark &
\checkmark\\
174 &
8 & b & b & b & a & b &
\checkmark &
\checkmark &
\checkmark &
\checkmark\\
175 &
9 & a & b & b & b & a &
\xmark &
\xmark &
\checkmark &
\checkmark\\
178 \caption{Combinations of test cases
}
179 \label{table:testpairs
}
182 \subsection{Quality, completeness and coverage of tests
}
184 The network packets used in testing are constructed from prerecorded, known to
185 be correct, network traffic. These packets are then modified with well used and
186 field tested tools. Due to this the chance of errors in the test cases is quite
187 low. However, no formal proof of correctness of the test cases is present, this
188 means that any defects found might not be the result of a fault in the SUT.
189 Therefore detected defects should only indicate there is a high chance that
190 there is a fault in the SUT and can not result directly in the conclusion that
191 there actually is one.
195 Due to the nature of black-box testing coverage of the code in the
196 implementation of the SUT is unknown. However completeness of the tests over
197 the specification of the SUT can be assessed.
201 Due to the clear and exhaustive specification of TCP the completeness of the
202 test suite can be clearly assessed.
204 As always, $
100\%$ completeness is not feasible, therefore test cases are
205 carefully selected to cover the most interesting parts of the TCP specification
206 to ensure a test suite.
208 To further decrease the number of tests needed test cases are divided into
209 equivalence partitions and the combination of cases as described in
210 Table~
\ref{table:testpairs
} ensures that all partitions are
211 covered and the number of individual tests is still feasible.
215 % wat ik ook probeer ik krijg de eerste collum
216 % zijn tekst niet verticaal gecentered
220 \subsection{Test cases
}
223 %\begin{tabularx}{\linewidth}{| l | X|}
226 %Title & Single valid request. \\\hline
227 %Input & Pcap file with prerecorded valid packets. \\\hline
228 %Expected output & Pcap file with valid response to request. \\\hline
229 %Course of action & \begin{enumerate}
230 % \item Execute \emph{./scripts/tests/case1-single-valid.sh}
231 % \item Load \emph{output/case1.pcap} with ...
232 %\end{enumerate} \\\hline
233 %Valid trace & \begin{enumerate}
234 % \item \textbf{Hier packets benoemen?}
235 %\end{enumerate} \\\hline
238 %\begin{tabularx}{\linewidth}{| l | X|}
241 %Title & Single request with corrupted checksum. \\\hline
242 % Input & Pcap file used as \emph{test-case 1} input. \\\hline
243 % Expected output & No response from SUT, logs with rejected packets. \\\hline
244 % Course of action & \begin{enumerate}
245 % \item Load input pcap file into ....
246 % \item Corrupt checksum of loaded packets.
247 % \item Save resulting packets as pcap file.
248 % \item Load new pcap file into ...
249 % \item Replay new pcap file.
250 % \item Record SUT response using...
251 % \item Extract log with rejected packets.
252 % \item Save recorded packets as a pcap file.
253 % \item Analyze packets in resulting file.
254 % \end{enumerate} \\\hline
255 % Valid trace & \begin{enumerate}
256 % \item \textbf{Aangeven welke packets corrupted zijn?}
257 % \end{enumerate} \\\hline