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
76 \item Use
\emph{ls packets
}
77 \item Verify that there is a file named
\texttt{single.pcap
} and
81 Passed &
\textit{Yes/No
}\\
83 \caption{Preflight checklist
\label{tbl:preflight
}}
86 \subsection{Testing of SUT
}
87 The SUT is a series of services for other computer programs with no end-user
88 facing interface. Therefore the SUT will be tested solely by calling it's
89 services through various automated scripts. An automated test suite will be
90 available which executes all these automated scripts and aggregates their
91 results to asses whether or not the SUT has passed the test.
93 The implementation of the SUT is tested using black box testing techniques. A
94 series of tests asses the correctness of the implementation with regards to the
95 TCP specification. These tests are specified in Table~
\textbf{referentie naar
96 tests-tabel
}. The test cases aim to cover the most interesting parts of the TCP
99 To cover the TCP specification as complete as possible while still maintaining
100 a feasible test suite the tests are divided into equivalence partitions. Below
101 these partitions are given.
104 \item \emph{Number of packets
} in request~
\footnote{A request is considered
105 establishing a connection (handshake) and a number of payload packets
}
107 \item 0 payload packets
108 \item 1 payload packet
109 \item n=small payload packets
110 \item n=big payload packets
112 \item \emph{source port
}
117 \item \emph{destination port
}
122 \item Bits flipped in
\emph{payload
}
124 \item Correct payload
125 \item Payload with even number of bits flipped
126 \item Payload with odd number of bits flipped
128 \item \emph{checksum
}
137 \item Missing packets
141 \textbf{hier iets over waarom deze partities relevant zijn! Waarom odd en
142 even number of bits flipped bijv interessant?
}
145 Partitions
2 to
6 are tested using pairwise testing to keep the number of test
146 cases feasible. The pairs are then all *except some where it does not make sense
147 to do so) tested with the different request sizes of partition
1.
149 This is expressed in Table~
\ref{table:testpairs
}.
153 \begin{tabular
}{|l|l|l|l|l|l|l|l|l|l|l|
}
155 &
\multicolumn{10}{c|
}{\textbf{Partition
}}\\
157 & \# &
4 &
5 &
3 &
6 &
2 &
1a &
1b &
1c &
1d\\
159 \multirow{9}{*
}{Instance
}
160 &
1 & a & a & a & a & a &
\checkmark &
\checkmark &
\checkmark &
\checkmark\\
161 &
2 & a & b & b & c & b &
\xmark &
\xmark &
\checkmark &
\checkmark\\
162 &
3 & c & a & b & a & b &
\xmark &
\xmark &
\checkmark &
\checkmark\\
163 &
4 & c & b & a & c & a &
\xmark &
\xmark &
\checkmark &
\checkmark\\
164 &
5 & b & a & b & c & a &
\xmark &
\xmark &
\checkmark &
\checkmark\\
165 &
6 & b & b & a & b & b &
\xmark &
\xmark &
\checkmark &
\checkmark\\
166 &
7 & c & b & b & a & b &
\checkmark &
\checkmark &
\checkmark &
\checkmark\\
167 &
8 & b & b & b & a & b &
\checkmark &
\checkmark &
\checkmark &
\checkmark\\
168 &
9 & a & b & b & b & a &
\xmark &
\xmark &
\checkmark &
\checkmark\\
171 \caption{Combinations of test cases
}
172 \label{table:testpairs
}
175 \subsection{Quality, completeness and coverage of tests
}
177 The network packets used in testing are constructed from prerecorded, known to
178 be correct, network traffic. These packets are then modified with well used and
179 field tested tools. Due to this the chance of errors in the test cases is quite
180 low. However, no formal proof of correctness of the test cases is present, this
181 means that any defects found might not be the result of a fault in the SUT.
182 Therefore detected defects should only indicate there is a high chance that
183 there is a fault in the SUT and can not result directly in the conclusion that
184 there actually is one.
188 Due to the nature of black-box testing coverage of the code in the
189 implementation of the SUT is unknown. However completeness of the tests over
190 the specification of the SUT can be assessed.
194 Due to the clear and exhaustive specification of TCP the completeness of the
195 test suite can be clearly assessed.
197 As always, $
100\%$ completeness is not feasible, therefore test cases are
198 carefully selected to cover the most interesting parts of the TCP specification
199 to ensure a test suite.
201 To further decrease the number of tests needed test cases are divided into
202 equivalence partitions and the combination of cases as described in
203 Table~
\ref{table:testpairs
} ensures that all partitions are
204 covered and the number of individual tests is still feasible.
208 % wat ik ook probeer ik krijg de eerste collum
209 % zijn tekst niet verticaal gecentered
213 \subsection{Test cases
}
216 %\begin{tabularx}{\linewidth}{| l | X|}
219 %Title & Single valid request. \\\hline
220 %Input & Pcap file with prerecorded valid packets. \\\hline
221 %Expected output & Pcap file with valid response to request. \\\hline
222 %Course of action & \begin{enumerate}
223 % \item Execute \emph{./scripts/tests/case1-single-valid.sh}
224 % \item Load \emph{output/case1.pcap} with ...
225 %\end{enumerate} \\\hline
226 %Valid trace & \begin{enumerate}
227 % \item \textbf{Hier packets benoemen?}
228 %\end{enumerate} \\\hline
231 %\begin{tabularx}{\linewidth}{| l | X|}
234 %Title & Single request with corrupted checksum. \\\hline
235 % Input & Pcap file used as \emph{test-case 1} input. \\\hline
236 % Expected output & No response from SUT, logs with rejected packets. \\\hline
237 % Course of action & \begin{enumerate}
238 % \item Load input pcap file into ....
239 % \item Corrupt checksum of loaded packets.
240 % \item Save resulting packets as pcap file.
241 % \item Load new pcap file into ...
242 % \item Replay new pcap file.
243 % \item Record SUT response using...
244 % \item Extract log with rejected packets.
245 % \item Save recorded packets as a pcap file.
246 % \item Analyze packets in resulting file.
247 % \end{enumerate} \\\hline
248 % Valid trace & \begin{enumerate}
249 % \item \textbf{Aangeven welke packets corrupted zijn?}
250 % \end{enumerate} \\\hline