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