final
[tt2015.git] / a1 / 2approach.tex
1 The test process consists of several stages. The results of the first stage,
2 planning, are descibed in this document. On the basis of this document actual
3 test cases will be designed. Afterwards the actual tests will be implemented
4 and executed. The results of these tests will then be evaluated against the
5 exit criteria found in Section~\ref{sec:exitcriteria} and depending on the
6 outcome of these evaluations further tests might be deemed necessary.
7
8 \subsection{Quality Characteristics}
9 The quality characteristics that are to be tested are described using the
10 ISO/IEC 25010~\cite{iso25010} as a guideline. In the following sections we will
11 discuss the relevant \textit{product quality} and \textit{quality in use}
12 characteristics.
13
14 \subsubsection{Product quality}
15 Product quality is divided into eight main categories which are divided into
16 several subcategories. Below we will discuss the qualities which are relevant
17 to the SUT.
18 \begin{itemize}
19 \item \textbf{Functional suitability}\\
20 As described in Section~\ref{sec:risks} the SUT is core functionality of
21 the networking capable system. Because many other systems running on the
22 system could rely on it it is very important that the SUT is functionality
23 suitable. Therefore all three sub characteristics of Functional
24 Suitability (\textit{Functional completeness, Functional correctness,
25 Functional appropriateness}) are of vital importance. As was previously
26 mentioned in Section~\ref{sec:risks} extra emphasis should be placed on
27 testing \emph{Functional Correctness} as recovery from Failures in
28 computer-to-computer systems is problematic.
29 \item \textbf{Performance efficiency} \label{sec:perf_eff}\\
30 As the SUT runs as a service on a system with other programs it must have
31 efficient \emph{resource utilisation}. It can not contain any memory leaks
32 or use other resources more than necessary.
33 \item \textbf{Compatibility}\\
34 \emph{Interoperability} is the key feature of the SUT as it's purpose is to
35 communicate with other systems implementing the TCP protocol. Therefore it
36 is of vital importance that the SUT implements the TCP protocol correctly.
37 Furthermore it is very important that the SUT can \emph{co-exist} with
38 other programs on the system it runs on, since it is used as a service by
39 those programs. This means that the SUT has to handle preemption as well as
40 having multiple programs requesting it's services at once.
41 \item \textbf{Reliability}\\
42 As stated before, the SUT is used as a core service, this means it has to
43 be very \emph{mature}. It needs to behave as expected under normal working
44 conditions. As it can continually be requested the SUT needs to have
45 constant
46 \emph{availability}. As the SUT relies on a potentially unreliable channel
47 to send and receive data it needs to be \emph{fault tolerant}. The SUT
48 needs to properly handle errors in received data or complete unavailability
49 of the underlying channel.
50 \end{itemize}
51 This leaves four categories which are not relevant the SUT. Below we will
52 shortly discuss per category why these are not relevant. \emph{Maintainability}
53 is an important aspect of any software system, however for the SUT it is not a
54 core aspect, as it is first and foremost of importance that the implementation
55 is correct, furthermore TCP does not change often. \emph{Usability} isn't a
56 core aspect either, as the SUT is not used directly by humans, but is a service
57 which is addressed when another program needs it. \emph{Portability} isn't
58 either as the SUT is installed on a system once and intended to work on that
59 system. \emph{Security} isn't a feature of the SUT either, systems using the
60 SUT can add their own security mechanisms on top of it.
61
62
63 \subsubsection{Quality in use}
64 Quality in use is dived into five subcategories. Below we will discuss the
65 categories which are relevant to the SUT.
66 \begin{itemize}
67 \item \textbf{Effectiveness}\\
68 This is the core aspect of the SUT, users (other programs) need to be able
69 to effectively use the SUT to send and receive data.
70 \item \textbf{Efficiency}\\
71 This issue has already been covered above under
72 ``performance efficiency''~\ref{sec:perf_eff}.
73 \item \textbf{Satisfaction}\\
74 It is important that programs using the SUT can \emph{trust} that the SUT
75 provides the promised services. This means that data is send and received
76 reliably and the SUT provides clear and unambiguous errors when this
77 service
78 can not be provided.
79 \item \textbf{Context Coverage}\\
80 The SUT needs to behave as expected in all specified contexts
81 (\emph{context completeness}).
82 \end{itemize}
83 This leaves \emph{freedom from risk}, which we consider not relevant as the SUT
84 itself does not pose any risks, and correct implementation (which is covered in
85 the other categories) gives clear guarantees to programs using the services of
86 the SUT.
87
88 \subsection{Levels and types of testing} \label{section:levels}
89 The client will deliver a product for certification. This means our team will
90 only conduct \emph{acceptance testing} and assume that the client who requested
91 certification has conducted \emph{unit}, \emph{module} and \emph{integration
92 testing}. We will only be conducting \emph{black-box testing} and the client
93 is not required to handover any source-code.
94
95 Initially we will conduct a few basic \emph{manual tests} based on experience
96 acquired from previous certification requests (\emph{error guessing}). If the
97 product fails these basic tests we immediately reject it and seize all further
98 activities.
99
100 If the product is not rejected after the basic \emph{manual tests} we will
101 proceed with the second stage of testing. For these follow-up tests we will use
102 \emph{equivalence partitioning} to reduce the number of test cases. Every test
103 case will result in a test report. If any of the test cases fail the product
104 is rejected. In order to deliver usable feedback to the client we will still
105 produce a test report.
106
107 \subsubsection{Manual tests}
108
109 The basic tests mentioned in Section~\ref{section:levels} are conducted using a
110 checklist. If any of the checks fail we immediately reject the product.
111
112 \begin{enumerate}
113 \item Is the product complete?
114 \item Does the product come with a manual or quick start guide?
115 \item Is it possible to get the product in a usable state?
116 \item Can we use the product to initiate a connection in a corruption
117 free
118 environment?
119 \end{enumerate}
120
121 These\emph{ manual tests} are performed in order to ensure that the client has
122 delivered a usable product.
123
124 \subsubsection{Test generation}
125
126 For the second state of testing we first use \emph{equivalence partitioning} to
127 reduce the overall number of test cases as mentioned in
128 Section~\ref{section:levels}. At the highest level we can define the following
129 equivalent \emph{input classes} for the SUT.
130
131 \begin{enumerate}
132 \item Valid requests:
133 \begin{enumerate}
134 \item Single request.
135 \item Multiple requests.
136 \end{enumerate}
137 \item Invalid requests:
138 \begin{enumerate}
139 \item Single request.
140 \item Multiple requests.
141 \end{enumerate}
142 \end{enumerate}
143
144 For these requests we can introduce more cases by applying \emph{equivalence
145 partitioning} to the different packets that are sent during one request.
146
147 \begin{enumerate}
148 \item Packets received in order.
149 \item Packets received out of order.
150 \end{enumerate}
151
152 For each individual packet we can specify the follow \emph{equivalent classes}.
153
154 \begin{enumerate}
155 \item Valid packet.
156 \item Corrupted packet.
157 \item Missing packets.
158 \end{enumerate}
159
160 A \emph{decision table} is used in order to ensure all different equivalent
161 classes are covered in our tests. Valid packets can only exist in one form,
162 the valid form and there is no need to divide these into additional classes.
163 For the invalid packets we will construct a test case where only one parameter
164 is made invalid. For the invalid value of this parameter we use \emph{boundary
165 value analysis} to reduce the total number of test cases. The SUT input
166 parameters correspond to different fields in the network packets. The
167 following fields and there boundary values are considered during the testing.
168
169 \begin{enumerate}
170 \item Checksum: valid, invalid.
171 \item Header: valid, even or odd number of bits corrupted.
172 \item Payload: valid, even or odd number of bits corrupted.
173 \end{enumerate}
174
175 \subsubsection{Test environment and automatization}
176 \label{section:testenv}
177 All the tools we are going to use together with the SUT gives us the following
178 collection of software
179
180 \begin{itemize}
181 \item Windows\footnote{\url{http://www.microsoft.com/en-us/windows}}, used
182 as a host OS.
183 \item Ubuntu\footnote{\url{http://www.ubuntu.com}}, used as the guest OS
184 running the SUT.
185 \item VirtualBox\footnote{\url{https://www.virtualbox.org/}}, used to run
186 the guest OS containing the SUT.
187 \item Wireshark\footnote{\url{https://www.wireshark.org/}}, used on the
188 guest OS in order to capture and analyze network traffic.
189 \item Bit-Twist\footnote{\url{http://bittwist.sourceforge.net/}}, used to
190 prepare network packets.
191 \item Java\footnote{\url{http://www.java.com}} TCP driven echo server.
192 \end{itemize}
193
194 \begin{figure}[H]
195 \label{fig:sut}
196 \centering
197 \includegraphics[width=0.5\linewidth]{SUTsetup.eps}
198 \caption{Test environment}
199 \end{figure}
200
201
202 All test will be conducted in a virtual environment. We will use VirtualBox to
203 run a Linux distribution with the product installed. The Linux distribution in
204 question is Ubuntu. All the tests are performed from within the VirtualBox
205 environment. When testing network transmissions we will only analyze the
206 packets sent/received to/from the SUT. The host system is disconnected from the
207 Internet or any other network in order to prevent unnecessary traffic.
208 % Dit is niet nodig omdat het via loopback gaat
209 % Zeker weten? de SUT ontvangt ook niet loopback packets toch?
210 % Ja maar we geven de host gewoon geen interface?
211
212 For each test case (except for the \emph{manual tests}) a file containing
213 previously captured network traffic will be replayed using Wireshark and sent
214 to the \emph{Java TCP driven echo server}. We will use Bit-Twist to update the
215 prepared packets with the MAC address of the guest network adapter and provide
216 them with a valid source address. This updating step is needed because the
217 kernel would otherwise reject the packets and prevent them from reaching the
218 SUT. The response packets sent by the \emph{Java TCP driven echo server} and
219 passing trough the SUT will be recorded, analyzed and validated according to
220 the \textit{RFC793} specification. The valid packets are build manually from
221 the \textit{RFC793} specification. Invalid packets are generated from this
222 valid traffic using Bit-Twist. The boundary values for the different
223 parameters (fields in packets) are determined by hand. Automated scripts are
224 used in order to generate packets with some fields replaced with these
225 \emph{boundary values}.