Merge branch 'master' of https://github.com/dopefishh/tt2015
[tt2015.git] / a2 / 1cases.tex
1 \subsection{Preflight checklist}
2
3 Before actual certification is commenced we perform a manual test using a
4 checklist.
5 If any of the checks fail we immediately reject the product.
6
7 \begin{enumerate}
8 \item Is the product complete?
9 \item Does the product come with a manual or quick start guide?
10 \item Is it possible to get the product in a usable state?
11 \item Can we use the product to initiate a connection in a corruption
12 free environment?
13 \end{enumerate}
14
15 \textbf{DIT MOET VERANDERD WORDEN, HET PRODUCT ZOU AFGEKEURD WORDEN!}
16
17 \subsection{Testing of SUT}
18
19 The SUT is a series of services for other computer programs with no end-user
20 facing
21 interface. Therefore the SUT will be tested solely by calling it's services
22 through various automated scripts. An automated test suite will be available
23 which executes all these automated scripts and aggregates their results to
24 asses whether or not the SUT has passed the test.
25
26 The implementation of the SUT is tested using black box testing techniques. A
27 series of tests asses the correctness of the implementation with regards to the
28 TCP specification. These tests are specified in Table~\textbf{referentie naar
29 tests-tabel}. The test cases aim to cover the most interesting parts of the
30 TCP specification.
31
32 To cover the TCP specification as complete as possible while still maintaining
33 a feasible test suite the tests are divided into equivalence partitions. Below
34 these partitions are given.
35
36 \begin{enumerate}
37 \item \emph{Number of packets} in request\footnotemark
38 \footnotetext{A request is considered establishing a connection
39 (handshake) and any n number of payloadpackts}
40 \begin{enumerate}
41 \item 0 payload packets
42 \item 1 payload packet
43 \item n=small payload packets
44 \item n=big payload packets
45 \end{enumerate}
46 \item Correct or Incorrect \emph{source port}
47 \item Correct or Incorrect \emph{Destination port}
48 \item Bits flipped in \emph{Payload}
49 \begin{enumerate}
50 \item Correct payload
51 \item Payload with even number of bits flipped
52 \item Payload with odd number of bits flipped
53 \end{enumerate}
54 \item Correct or Incorrect \emph{checksum}
55 \item Packets received in or out of order, or missing packets
56 \end{enumerate}
57
58 \textbf{hier iets over waarom deze partities relevant zijn!}
59
60 Partitions 2 to 6 are tested using pairwise testing to keep the number of test
61 cases feasible. The pairs are then all *except some where it does not make sense
62 to do so) tested with the different request sizes of partition 1.
63
64 This is expressed in the table below.
65
66 \vspace{3mm}
67 \textbf{Hier daadwerkelijke decision tabel}
68 \vspace{3mm}
69
70 \subsection{Quality, completeness and coverage of tests}
71
72 The network packets used in testing are constructed from prerecorded, known to
73 be correct, network traffic. These packets are then modified with well used and
74 field tested tools. Due to this the chance of errors in the test cases is quite
75 low. However, no formal proof of correctness of the test cases is present, this
76 means that any defects found might not be the result of a fault in the SUT.
77 Therefore detected defects should only indicate there is a high chance that
78 there is a fault in the SUT and can not result directly in the conclusion that
79 there actually is one.
80
81 \bigskip
82
83 Due to the nature of black-box testing coverage of the code in the
84 implementation of the SUT is unknown. However completeness of the tests over
85 the specification of the SUT can be assessed.
86
87 \bigskip
88
89 Due to the clear and exhaustive specification of TCP the completeness of the
90 test suite can be clearly assessed.
91
92 As always, $100\%$ completeness is not feasible, therefore test cases are
93 carefully selected to cover the most interesting parts of the TCP specification
94 to ensure a test suite.
95
96 To further decrease the number of tests needed test cases are divided into
97 equivalence partitions and the combination of cases as described in
98 Table~(\textbf{referentie naar decision table}) ensures that all partitions are
99 covered and the number of individual tests is still feasible.
100
101
102 %
103 % wat ik ook probeer ik krijg de eerste collum
104 % zijn tekst niet verticaal gecentered
105 %
106 \begin{table}
107
108
109 \subsection{Test cases}
110
111 \begin{tabularx}{\linewidth}{| l | X|}
112 \hline
113 Nr & 1 \\\hline
114 Title & Single valid request. \\\hline
115 Input & Pcap file with prerecorded valid packets. \\\hline
116 Expected output & Pcap file with valid response to request. \\\hline
117 Course of action & \begin{enumerate}
118 \item Load input pcap file.
119 \item Replay pcap file using ...
120 \item Record SUT response using...
121 \item Save recorded packets as a pcap file.
122 \item Analyze packets in resulting file.
123 \end{enumerate} \\\hline
124 Valid trace & \begin{enumerate}
125 \item \textbf{Hier packets benoemen?}
126 \end{enumerate} \\\hline
127 \end{tabularx}
128
129 \begin{tabularx}{\linewidth}{| l | X|}
130 \hline
131 Nr & 2 \\\hline
132 Title & Single request with corrupted checksum. \\\hline
133 Input & Pcap file used as \emph{test-case 1} input. \\\hline
134 Expected output & No response from SUT, logs with rejected packets. \\\hline
135 Course of action & \begin{enumerate}
136 \item Load input pcap file into ....
137 \item Corrupt checksum of loaded packets.
138 \item Save resulting packets as pcap file.
139 \item Load new pcap file into ...
140 \item Replay new pcap file.
141 \item Record SUT response using...
142 \item Extract log with rejected packets.
143 \item Save recorded packets as a pcap file.
144 \item Analyze packets in resulting file.
145 \end{enumerate} \\\hline
146 Valid trace & \begin{enumerate}
147 \item \textbf{Aangeven welke packets corrupted zijn?}
148 \end{enumerate} \\\hline
149 \end{tabularx}
150 \end{table}
151
152 \newpage