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{longtabu
}{|l|X|
}
12 Check
1 & Get the SUT in a workable state. \\
16 \item Import the VirtualBox image into VirtualBox.
18 \item Verify the SUT booted successfully and the network modules
21 \hline Passed &
\textit{Yes/No
} \\
23 Check
2 & Verify the SUT is complete. \\
\hline
26 \item Boot the SUT as in
\emph{Check
1}.
27 \item Verify the loopback device exists by running
29 \item Verify the
\emph{echo-server
} is present on the system.
30 \item Verify
\emph{Scapy
} is present on the system by running
32 \item Verify all scripts used for testing are present on the
36 Passed &
\textit{Yes/No
}\\
37 Check
3 & Initialize the testing environment.\\
41 \item Boot the SUT as in
\emph{Check
1}.
42 \item Setup iptables by executing
43 \texttt{\# code/iptables.sh
}~
\footnote{ The IPTables script
44 ensures that the OS does not drop packets due to an the
46 \item Navigate to the working directory by running
47 \texttt{\$ cd /home/student/tt2015
}
48 \item Compile the echo server by running
49 \texttt{\# cd code/server \&\& make \&\& cd -
}
50 \item Start the echo server by running
51 \texttt{\# cd code/server \&\& java Main
}
54 Passed &
\textit{Yes/No
}\\
56 Check
4 & Test the tool environment.\\
60 \item Initialize the SUT as in
\emph{Check
3}
61 \item Execute the test script by running
62 \texttt{\# code/client/helloworld.py
}.
63 \item Verify the console displays a success message.
66 Passed &
\textit{Yes/No
}\\
68 Check
5 & All test inputs and scripts are present. \\
\hline
69 % DIT MOET NOG EVEN ANDERS
72 \item Boot the SUT as in
\emph{Check
1}.
73 \item Execute the command
\texttt{ls scripts/tests
}
74 \item Verify that there is a file named case$X$ for each test case $X$
75 \item Use
\emph{ls packets
}
76 \item Verify that there is a file named
\texttt{single.pcap
} and
80 Passed &
\textit{Yes/No
}\\
82 \caption{Preflight checklist
\label{tbl:preflight
}}
85 \subsection{Testing of SUT
}
86 The SUT is a series of services for other computer programs with no end-user
87 facing interface. Therefore the SUT will be tested solely by calling it's
88 services through various automated scripts. An automated test suite will be
89 available which executes all these automated scripts and aggregates their
90 results to asses whether or not the SUT has passed the test.
92 The implementation of the SUT is tested using black box testing techniques. A
93 series of tests asses the correctness of the implementation with regards to the
94 TCP specification. These tests are specified in Table~
\textbf{referentie naar
95 tests-tabel
}. The test cases aim to cover the most interesting parts of the TCP
98 To cover the TCP specification as complete as possible while still maintaining
99 a feasible test suite the tests are divided into equivalence partitions. Below
100 these partitions are given.
103 \item \emph{Number of packets
} in request~
\footnote{A request is considered
104 establishing a connection (handshake) and a number of payload packets
}
106 \item 0 payload packets
107 \item 1 payload packet
108 \item n=small payload packets
109 \item n=big payload packets
111 \item Correct or incorrect
\emph{source port
}
112 \item Correct or incorrect
\emph{destination port
}
113 \item Bits flipped in
\emph{payload
}
115 \item Correct payload
116 \item Payload with bit flips
117 \item Payload with odd number of bits flipped
119 \item Correct or Incorrect
\emph{checksum
}
120 \item Packets received in or out of order, or missing packets
123 These partitions were chosen since they correspond to key parts of the TCP
126 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
127 source or destination port set to an incorrect value should not be regarded
128 as segments belonging to the connection.
130 TCP uses a
\emph{checksum
} to catch any error introduced in headers, when this
131 checksum does not match the actual computed checksum the packet should be
134 The TCP checksum is also an inherently weak one, as it is simply the
135 bitwise negation of the addition in ones complement arithmetic
136 of all
16 bit words in the header and data of the segment (excluding the
137 header). Therefore any bit error where the ones complement value of one word
138 increases by one, and the value of another decreases by one, is undetected.
139 The SUT should exhibit the same behavior and accept packets where these type
142 \textbf{hier iets over waarom deze partities relevant zijn! Waarom odd en
143 even number of bits flipped bijv interessant?
}
146 Partitions
2 to
6 are tested using pairwise testing to keep the number of test
147 cases feasible. The pairs are then all *except some where it does not make sense
148 to do so) tested with the different request sizes of partition
1.
150 This is expressed in Table~
\ref{table:testpairs
}.
153 % DIT MAAK IK NOG EVEN MOOI
154 \begin{tabularx
}{\linewidth}{p
{2cm
} | l | p
{2cm
} | l | p
{1cm
} || c | c | p
{1.3cm
} | p
{1.3cm
}}
155 \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
156 Correct & Correct & Correct & In order & Correct &
\checkmark &
\checkmark &
\checkmark &
\checkmark \\
\hline
157 Correct & Incorrect & Incorrect & Missing packet & Incorrect &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
158 odd\# of bits flipped & Correct & Incorrect & Out of order & Incorrect &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
159 odd\# of bits flipped & Incorrect & Correct & Missing packet & Correct &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
160 even\# of bits flipped & Correct & Incorrect & Missing packet & Correct &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
161 even\# of bits flipped & Incorrect & Correct & Out of order & Incorrect &
\xmark &
\xmark &
\checkmark &
\checkmark \\
\hline
162 odd\# of bits flipped & Incorrect & Incorrect & In order & Incorrect &
\checkmark &
\checkmark &
\checkmark &
\checkmark \\
\hline
163 even\# of bits flipped & Incorrect & Incorrect & In order & Incorrect &
\checkmark &
\checkmark &
\checkmark &
\checkmark \\
\hline
164 Correct & Incorrect & Incorrect & Out of order & Correct &
\xmark &
\xmark &
\checkmark &
\checkmark \\
166 \caption{Combinations of test cases
}
167 \label{table:testpairs
}
170 \subsection{Quality, completeness and coverage of tests
}
172 The network packets used in testing are constructed from prerecorded, known to
173 be correct, network traffic. These packets are then modified with well used and
174 field tested tools. Due to this the chance of errors in the test cases is quite
175 low. However, no formal proof of correctness of the test cases is present, this
176 means that any defects found might not be the result of a fault in the SUT.
177 Therefore detected defects should only indicate there is a high chance that
178 there is a fault in the SUT and can not result directly in the conclusion that
179 there actually is one.
183 Due to the nature of black-box testing coverage of the code in the
184 implementation of the SUT is unknown. However completeness of the tests over
185 the specification of the SUT can be assessed.
189 Due to the clear and exhaustive specification of TCP the completeness of the
190 test suite can be clearly assessed.
192 As always, $
100\%$ completeness is not feasible, therefore test cases are
193 carefully selected to cover the most interesting parts of the TCP specification
194 to ensure a test suite.
196 To further decrease the number of tests needed test cases are divided into
197 equivalence partitions and the combination of cases as described in
198 Table~
\ref{table:testpairs
} ensures that all partitions are
199 covered and the number of individual tests is still feasible.
203 % wat ik ook probeer ik krijg de eerste collum
204 % zijn tekst niet verticaal gecentered
208 \subsection{Test cases
}
211 %\begin{tabularx}{\linewidth}{| l | X|}
214 %Title & Single valid request. \\\hline
215 %Input & Pcap file with prerecorded valid packets. \\\hline
216 %Expected output & Pcap file with valid response to request. \\\hline
217 %Course of action & \begin{enumerate}
218 % \item Execute \emph{./scripts/tests/case1-single-valid.sh}
219 % \item Load \emph{output/case1.pcap} with ...
220 %\end{enumerate} \\\hline
221 %Valid trace & \begin{enumerate}
222 % \item \textbf{Hier packets benoemen?}
223 %\end{enumerate} \\\hline
226 %\begin{tabularx}{\linewidth}{| l | X|}
229 %Title & Single request with corrupted checksum. \\\hline
230 % Input & Pcap file used as \emph{test-case 1} input. \\\hline
231 % Expected output & No response from SUT, logs with rejected packets. \\\hline
232 % Course of action & \begin{enumerate}
233 % \item Load input pcap file into ....
234 % \item Corrupt checksum of loaded packets.
235 % \item Save resulting packets as pcap file.
236 % \item Load new pcap file into ...
237 % \item Replay new pcap file.
238 % \item Record SUT response using...
239 % \item Extract log with rejected packets.
240 % \item Save recorded packets as a pcap file.
241 % \item Analyze packets in resulting file.
242 % \end{enumerate} \\\hline
243 % Valid trace & \begin{enumerate}
244 % \item \textbf{Aangeven welke packets corrupted zijn?}
245 % \end{enumerate} \\\hline