\documentclass[signature]{deltares_manual}
\usepackage[titletoc]{appendix}

\renewcommand\BackgroundPicChapter{
    \put(0,0){
    \parbox[b][\paperheight]{\paperwidth}{%
        \vspace{4\baselineskip}
        \hspace{220mm}
        \includegraphics[width=15mm]{pictures/Ribbon.pdf}%
        \vfill
        }
    }
}

\renewcommand{\contactsalesandsupport}{
	\textbf{Contact:}\\
	\begin{tabular}[t]{@{}p{0.50\textwidth}p{0.50\textwidth}}
	\vspace*{-1.5\baselineskip}
	\begin{tabbing}
	Helpdesk Water  \\
	Rijkswaterstaat WVL \\
	P.O. 2232 \\
	3500 GE Utrecht \\
	The Netherlands \\
	\end{tabbing}
	&
	\vspace*{-1.5\baselineskip}
	\begin{tabbing}
	telephone: \= +31\,88\,797\,7102 \\
	www:       \> http://www.helpdeskwater.nl \\
	\end{tabbing}
	\end{tabular}
}

%
%------------------------------------------------------------------------------
%
\begin{document}
\pagestyle{empty}
\includepdf[pages=1, offset=72 -70]{pictures/DSoilModel_TestPlan_Cover.pdf} % links-rechts past precies
\cleardoublepage

\newcommand{\DSoilModelPlusSpace}{D-Soil~Model\xspace}
\newcommand{\DSoilModel}{D-Soil~Model}

\title{\DSoilModel}
\subtitle{}
\manualtype{Test Plan}
\version{4.1}
\date{June 2017}

\client{RWS}
\projectnumber{1230088-026}
\reference{1230088-026-DSC-0002}
\classification{-}

\keywords{WTI2017, hydraulic structures, structural failure, calculation kernel, wave pressure, linear load calculation, quadratic load calculation}

\references{Refer to \autoref{chapter5}.}

\summary{This document contains version 4.1 of the test plan for \DSoilModel.}

\textbf{\footnotesize{Samenvatting}} \newline
Dit document bevat versie 4.1 van het testplan voor \DSoilModel.

\authori{dr. V. Trompille}
\revieweri{dr.ir. J.G. van \newline Putten}
\approvali{ir. J. Icke}
\versioni{2.0}
\datei{April 2016}

\authorii{dr. V. Trompille}
\reviewerii{dr.ir. J.G. van \newline Putten}
\approvalii{ir. J. Icke}
\versionii{3.0}
\dateii{Aug. 2016}

\authoriii{dr. V. Trompille}
\revieweriii{dr.ir. J.G. van \newline Putten}
\approvaliii{ir. J. Icke}
\versioniii{4.0}
\dateiii{Dec. 2016}

\authoriv{dr.ir. A.A. Markus}
\revieweriv{dr.ir. J.G. van \newline Putten}
\approvaliv{ir. J. Icke}
\versioniv{4.1}
\dateiv{June 2017}


\status{final}

\deltarestitle
%------------------------------------------------------------------------------

\chapter{Introduction}

\section{Purpose and scope of this document} \label{sec:1.1}

This document contains the test plan for \DSoilModel.

The document will not give any background on the context of the WTI project. For this purpose the reader is referred to the WTI2017 and to its supporting technical reports and their background reports underneath (\autoref{sec:1.2}).

This document will not describe how the requirements of the functional design are implemented in the program but described how the requirements of the functional design are tested.


\section{Other system documents} \label{sec:1.2}

The full documentation on \DSoilModelPlusSpace comprises the following documents.

\renewcommand{\arraystretch}{1.2}

\begin{table}[H]
%\caption{xxx}
%\label{xxx}
\begin{tabular}{|p{60mm}|p{\textwidth-60mm-24pt}|} \hline
\textbf{Title} & \textbf{Content} \\ \hline
Requirements and Functional Design \newline \citep{DSoilModel_FunctionalDesign} & Description of the requirements and functional design. \\ \hline
Technical Design \newline \citep{DSoilModel_TechnicalDesign} & Description of the implementation of the functional design \\ \hline
Technical Specification & Description of the arguments and usage of different software components, generated from in-line comment with Doxygen \\ \hline
Test Plan & This document  \\ \hline
Test Report & Actuated results of the test plan. \\ \hline
User Manual \newline \citep{DSoilModel_Manual} & Description of the different functionalities available in the \textit{User Interface} and background information. \\ \hline
\end{tabular}
\end{table}


\section{Assumptions and constraints}

\textbf{CNS 1} As a general constraint, the development process needs to comply with the general process description for WTI software, contained in a separate document \citep{Eisen}.

\textbf{CNS 2} As a general constraint, the program needs to comply with the relevant general requirements and further design rules for the programming, documentation and testing of WTI software. This set of requirements and rules is contained in a separate document \citep{Basisuitgangspunten}.



\section{Test levels} \label{sec:1.4}
According to \cite{OverallTestPlanWTI}, the program \DSoilModelPlusSpace should be tested on four different levels (V-Model):
\begin{enumerate}
	\item Component Testing
	\item Integration Testing
	\item System Testing
	\item Acceptance Testing
\end{enumerate}

\subsection*{Component Testing (Unit tests)}
Component Testing is testing on code level using the unit tests. For each relevant function, a unit test is defined within the C\# solution. A relevant function is a function that actually performs part of the calculation, validation or I/O of the core. Properties and purely administrative functions do not have unit tests. \\
Refer to \Cref{chapter2} for more information.

\subsection*{Integration Testing (Integration tests)}
Integration Testing is testing on functional level using integration tests. These types of tests combine multiple functions to prove that high level functionality works. For this, a unit test is defined within the C\# solution for each method with high level functionality.\\
Refer to \Cref{chapter3} for more information.

\subsection*{System Testing (Benchmarks and test scripts)}
System Testing is testing the functioning of the complete system:
\begin{itemize}%[no separator]
	\item The \textit{User Interface} must function properly: this testing must proved that the functional and non-functional requirements are met;
	\item All possible errors must be handled and reported properly (including the minimum and maximum values of input).
	
\end{itemize}	
Refer to \Cref{chapter4} for more information.

\subsection*{Acceptation level (Acceptance tests)}
The Acceptance Test of \DSoilModelPlusSpace will be covered in the acceptance test for the overall WTI system (which includes acceptance tests for the stand-alone tools) and will be reported in a so-called Acceptance Report \citep{AcceptatieTestPlan}.

\section{Code coverage}\label{sec:1.5}

Testing is considered to be ok when all the unit tests pass and when the code coverage of those tests is more than 60\% so as prescribed in \cite{OverallTestPlanWTI} because it is a Delta Shell Light product.

To determine the code coverage of the \textit{Calculation} components, the feature `Code coverage' of Visual Studio can be used. This tool shows the percentage of the code that was tested in each assembly, class, and method, and is visible on the build server.




%------------------------------------------------------------------------------
\chapter{Component Testing (Unit tests)} \label{chapter2}

The tests on code level are the unit tests. For each relevant function, a unit test is defined within the C\# solution. A relevant function is a function that actually performs part of the calculation, validation or I/O of the core. Properties and purely administrational functions do not have unit tests.

These tests are considered to be ok when the unit tests pass and when the code coverage of those tests is more than 60\%, as prescribed in \cite{OverallTestPlanWTI} for UI solutions. For these tests, see the C\# solution.

The following information must be provided in the Test Report:
\begin{itemize}
	\item Number of unit tests
	\item Code coverage of the unit tests
	\item Specify if all unit tests succeed or not
\end{itemize}


%------------------------------------------------------------------------------
\chapter{Integration Testing (Integration tests)} \label{chapter3}

The tests on functional level are the integration tests. These types of tests combine multiple functions in the kernel to prove that high level functionality works. For this, an integration test is defined within the C\# solution for each method with high level functionality.

These tests are considered to be ok when the integration tests pass. For these tests, see the C\# solution.

The following information must be provided in the Test Report:
\begin{itemize}
	\item Number of integration tests
	\item Code coverage of the integration tests
	\item Specify if all integration tests succeed or not
\end{itemize}



%------------------------------------------------------------------------------
\chapter{System testing (Test Scripts)} \label{chapter4}

As \DSoilModelPlusSpace is a database and support software for schematize the subsoil, the system testing will only consist of executing test scripts and common tests for general User Interface functionalities.


A Test Script will be provided to the tester, describing a sequence of actions and the expected outcome. Another goal of the test script is testing against the functional and non-functional requirements in the Functional Design \citep{DSoilModel_FunctionalDesign}. An overview of the Test Scripts is listed below:
\begin{itemize}
	\item \textbf{Language:} \newline
	\DSoilModelPlusSpace is available only in Dutch. It must be tested that all visible texts (including the hints) are indeed in Dutch.
	\\
	\item \textbf{Layout:}\newline
	The layout must be identical to the layout described in the Technical Design \citep{DSoilModel_TechnicalDesign}:
	\begin{itemize}
		\item Menu items
		\item Options in each menu items
		\item Tool bar
		\item Components
		\item Tabs
		\item Icon bar of tabs
	\end{itemize}
	
	\item \textbf{Menu:} \newline
	All available options under the different items of the menu must be tested. \\
	This includes the importation of data's via the \textit{Import} option under the \textit{File} menu: all the possibilities supported by \DSoilModelPlusSpace must be tested by checking that the data's are correctly and completely imported.	
	%\begin{itemize}
		%\item Soils from database (*.mdb file)
		%\item 1D profiles from file (*.csv file)
		%\item 2D profiles from file (*.sti and *.geo files)
		%\item Surface lines from file (*.csv file)
		%\item Characteristic Points from file
		%\item Soil segments from file (csv) (*.csv file)
		%\item Soil segments from file (shape)
		%\item CPT from file (*.gef file)
		%\item Boring from file (*.gef file)
		%\item DAM import dataset (*.defx file and the underlying files refers in the defx)
		%\item Old Project database of previous versions or forerunners of \DSOILMODEL (*.mdb and *.gdb files)
	%\end{itemize}
	Each importation of a file will have at least one test script. The files to be tested will be provided to the tester.
	\\
	\item \textbf{Menu bar:} \newline
	All icons of the menu bar must be tested.
	\\
	\item \textbf{Tables toolbar:} \newline
	All icons of the Tables toolbar (when available) must be tested:
	\begin{itemize}
		\item Add
		\item Delete
		\item Cut
		\item Copy
		\item Paste
		\item Fits columns
		\item Edit
		\item Edit Unit
		\item Export (all available formats must be tested)
	\end{itemize}
	
	\item \textbf{Map / Length Profile toolbar:} \newline
	All icons of the Map and Length Profile toolbar (when available) must be tested:
	\begin{itemize}
		\item Selection
		\item Pan
		\item Zoom to extents
		\item Zoom to extents and	reset aspect ratio
		\item Zoom to data
		\item Zoom by rectangle
		\item Options
		\item Show legend
		\item Open layer from file
		\item Export layers	
		\item Save map
		\item Select web layer
		\item Selection	
		\item Add location for split
	\end{itemize}
	
	\item \textbf{Property Editors:} \newline
	The content of the property editor must be checked for all selected objects, this is especially true of the new features, the strength model "C-Phi or Su calucated" and the interpolation method for layers. \\
	The coupling between the content of the Property Editors and the Tables component must also be tested: changing a property in the Property Editors should affect the Tables component.
	\\
	\item \textbf{Default/Min/Max:} \newline
	The default, minimum and maximum values  of all properties (as given in the Functional Design) must be tested.
	\\
	\item \textbf{Filters:} \newline
	All possible filters must be tested, by checking that the resulting list of is as expected (no more, no less). All possible combination of filters must also be tested.
\end{itemize}

All the \textit{Test Scripts} are part of a so-called \textit{Test Document} that will be joined as Annex in the Test Report.


\section{Test Script template}

A test script will consist of:
\begin{itemize}
	\item The header of a test has a title.
  \item The description of a test.
  \item If applicable, the preconditions of a test. A precondition descripts the system state and data required to start the test;
	%\item The functional requirement which it applies to.
  \item The sequence of steps (acts) that must be performed to get the expected output. This is always on the form of a question for which a positive answer means that the test succeeds whereas a negative answer means that a test fails.	
  \item Remarks and details on the test results can be also added.
\end{itemize}


%If a test step fails, just add ``failed'' in the column ``Result''. \\

A table should be available in the Test Report showing the correspondence between the test-script number and the functional or non-functional requirement which is tested.

%The test script also needs to describe which functional and non functional requirements are tested.

\begin{table}[H]
%\caption{xxx}
%\label{xxx}
\begin{tabular}{|p{15mm}|p{70mm}|p{10mm}|p{\textwidth-95mm-48pt}|} \hline
\multicolumn{4}{|p{\textwidth-36pt}|}{\textbf{Test Title}} \\ \hline
\multicolumn{4}{|p{\textwidth-36pt}|}{<description of the tests>} \\ \hline
\multicolumn{4}{|p{\textwidth-36pt}|}{<description of the preconditions, such as system state and data>} \\ \hline
%\multicolumn{3}{|p{\textwidth-36pt}|}{Requirement(s): <describe which functional or/and non functional requirement(s) is (are) tested by this test script>} \\ \hline
\textbf{\textit{Test nr.}} & \textit{\textbf{Steps (test script)}} & \textit{\textbf{Result}} & \textit{\textbf{Comment}} \\ \hline
Test 1a & Does [action 1] lead to [expected output]? & Yes & \\ \hline
Test 1b & Does [action 2] lead to [expected output]? & Yes & Comment 1 \\ \hline
Test 1c & Does [action 3] lead to [expected output]? & No & Remark 1 explaining why the test failed \\ \hline
\end{tabular}
\end{table}



%------------------------------------------------------------------------------
\chapter{Literature} \label{chapter5}

\bibliography{../WTI_references/wti_references}


%------------------------------------------------------------------------------
%\cleardoublepage

\pagestyle{empty}
\mbox{}
\includepdf[pages=2, offset=-72 -70]{pictures/DSoilModel_TestPlan_Cover.pdf} % links-rechts past precies


\end{document}
