Index: doc/System/D-Soil Model - Test Report/pictures/TestCoverageForms3.png =================================================================== diff -u Binary files differ Index: doc/System/D-Soil Model - Test Report/pictures/TestCoverageForms1.png =================================================================== diff -u Binary files differ Index: doc/System/D-Soil Model - Test Report/D-Soil Model - Test Report.pdf =================================================================== diff -u -r162 -r164 Binary files differ Index: doc/System/D-Soil Model - Test Report/D-Soil Model - Test Report.tex =================================================================== diff -u -r162 -r164 --- doc/System/D-Soil Model - Test Report/D-Soil Model - Test Report.tex (.../D-Soil Model - Test Report.tex) (revision 162) +++ doc/System/D-Soil Model - Test Report/D-Soil Model - Test Report.tex (.../D-Soil Model - Test Report.tex) (revision 164) @@ -139,69 +139,71 @@ \renewcommand{\arraystretch}{1.3} \begin{tabular}{|p{\textwidth-40mm-36pt}|p{20mm}|p{20mm}|} \hline \rowcolor[gray]{.8}\textbf{Class name} & \textbf{Number} & \textbf{Failed} \\ \hline -\multicolumn{3}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.SoilModel.Forms.Tests}}} \\ \hline -GrassAssessmentContextTest & 1 & 0 \\ -GrassCalculationControlTest & 3 & 0 \\ -HydraulicLoadInputControlTest & 1 & 0 \\ -MainFormTest & 2 & 0 \\ -ProjectControllerTest & 10 & 0 \\ -RunupControlTest & 1 & 0 \\ -WaveImpactControlTest & 1 & 0 \\ \hline -\multicolumn{3}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.GrasToets.Tests}}} \\ \hline -BenchmarksRunUpTest & 56 & 0 \\ -BenchmarksWaveImpactTest & 17 & 0 \\ -RunUpModelConverterTest & 3 & 0 \\ -WaveImpactModelConverterTest & 3 & 0 \\ \hline -\textbf{Total} & \textbf{98} & \textbf{0} \\ \hline +\multicolumn{3}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.DSoilModel.Data.Tests}}} \\ \hline +DSoilModelTransformerTests & 5 & 0 \\ \hline +\multicolumn{3}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.DSoilModel.Tests}}} \\ \hline +DSoilModelContextTest & 8 & 0 \\ +DSoilModelIOTest & 8 & 0 \\ +DSoilModelProjectTest & 11 & 0 \\ +FilmStripTest & 4 & 0 \\ +SosSoilLayer1DTest & 5 & 0 \\ +SosSoilProfilesImporterTests & 5 & 0 \\ \hline +\multicolumn{3}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.Soilbase.Tests}}} \\ \hline +DatabaseTests & 7 & 0 \\ +SoilbaseTest & 10 & 0 \\ +SoilbaseWriterTest & 8 & 0 \\ \hline +\textbf{Total} & \textbf{71} & \textbf{0} \\ \hline \end{tabular} \end{table} + \section{Code coverage of the unit/integration tests} \label{sec:CodeCoverage} -To determine what proportion of the code is actually being tested by coded tests such as unit tests or integration tests, the code coverage feature of Visual Studio is used. The results of this tool are displayed on the Deltares build server called TeamCity (see appendix \autoref{app:CodeCoverage}). An overview is given in \autoref{tab:2-2} showing the percentage of the code that was tested in each assembly, class, and method. +To determine what proportion of the code is actually being tested by coded tests such as unit tests or integration tests, the code coverage feature of Visual Studio is used. The results of this tool are displayed on the Deltares build server called TeamCity (see appendix \autoref{app:CodeCoverage}). An overview is given in \autoref{tab:2-2} showing the percentage of the code that was tested for each class, method and statement for each of the three assemblies. \begin{table}[H] \caption{Code coverage of the unit tests and integration tests for \ProgramName} \label{tab:2-2} \renewcommand{\arraystretch}{1.3} -\begin{tabular}{|p{\textwidth-86mm-36pt}|p{23mm}|p{28mm}|p{35mm}|} \hline +\begin{tabular}{|p{\textwidth-83mm-36pt}|p{23mm}|p{28mm}|p{32mm}|} \hline \rowcolor[gray]{.8} Namespace & \textbf{Class} & \textbf{Method} & \textbf{Statement} \\ \hline -Deltares.DSoilModel.Data & 0\% (0/1) & 0\% (0/6) & 0\% (0/11) \\ \hline - -\textbf{Total} & \textbf{100\% (22/22)} & \textbf{92.2\% (178/193)} & \textbf{94.6\% (2245/2372)}\\ \hline +Deltares.DSoilModel.Data \newline (see \autoref{fig:TestCoverageData}) & 77.8\% (7/9) & 60.0\% (81/140) & 59.6\% (573/961) \\ \hline +Deltares.DSoilModel.Forms \newline (see \autoref{fig:TestCoverageForms}) & 16.7.\% (5/30) & 4.8\% (25/522) & 10.3\% (479/4665) \\ \hline +Deltares.Soilbase \newline (see \autoref{fig:TestCoverageSoilbase}) & 31.4\% (16/51) & 18.2\% (138/759) & 21.1\% (907/4290) \\ \hline +\textbf{Total} & \textbf{31.1\% (28/90)} & \textbf{17.4\% (247/1421)} & \textbf{19.8\% (1959/9916)}\\ \hline \end{tabular} \end{table} -\begin{table}[H] -\caption{Code coverage of the unit tests and integration tests for \ProgramName} -\label{tab:2-2} -\renewcommand{\arraystretch}{1.3} -\begin{tabular}{|p{\textwidth-86mm-36pt}|p{23mm}|p{28mm}|p{35mm}|} \hline -\rowcolor[gray]{.8} & \textbf{Class} & \textbf{Method} & \textbf{Statement} \\ \hline -\multicolumn{4}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.DSoilModel.Data}}} \\ \hline -CenterCrestLocation & 0\% (0/1) & 0\% (0/6) & 0\% (0/11) \\ \hline -DSoilModelDataSourceRedirector & 0\% (0/1) & 0\% (0/3) & 0\% (0/24) \\ \hline -DSoilModelIO & 100\% (1/1) & 60\% (15/259) & 65.7\% (201/306)\\ \hline -DSoilModelProject & 100\% (1/1) & 62.5\% (45/72) & 56.3\% (272/483)\\ \hline -DSoilModelStiFileTransformer & 100\% (1/1) & 100\% (5/5) & 86.4\% (19/22)\\ \hline -SoilSegmentSplitLocation & 0\% (0/1) & 0\% (0/10) & 0\% (0/28) \\ \hline -SosSoilLayer1D & 100\% (1/1) & 77.8\% (7/9) & 66.7\% (16/24) \\ \hline -SosSoilProfilesImporter & 100\% (1/1) & 100\% (8/8) & 95.0\% (38/40) \\ \hline -\multicolumn{4}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.DSoilModel.Forms}}} \\ \hline -GrassAssessmentContext & 100\% (1/1) & 100\% (9/9) & 97.8\% (45/46)\\ \hline -GrassCalculationControl & 100\% (1/1) & 100\% (3/3) & 98.6\% (72/73)\\ \hline -HydraulicLoadInputControl & 100\% (1/1) & 100\% (9/9) & 99.6\% (238/239)\\ \hline -MainForm & 100\% (1/1) & 72.2\% (13/18) & 85.8\% (229/267)\\ \hline -ProjectController & 100\% (1/1) & 83.3\% (10/12) & 86.8\% (46/53)\\ \hline -RunupControl & 100\% (1/1) & 45.5\% (5/11) & 87.4\% (445/509)\\ \hline -WaveImpactControl & 100\% (1/1) & 66.7\% (4/6) & 98.0\% (587/599)\\ \hline -\textbf{Total} & \textbf{100\% (22/22)} & \textbf{92.2\% (178/193)} & \textbf{94.6\% (2245/2372)}\\ \hline -\end{tabular} -\end{table} +%\begin{table}[H] +%\caption{Code coverage of the unit tests and integration tests for project Deltares.DSoilModel.Data} +%\label{tab:DSMData} +%\renewcommand{\arraystretch}{1.3} +%\begin{tabular}{|p{\textwidth-86mm-36pt}|p{23mm}|p{28mm}|p{35mm}|} \hline +%\rowcolor[gray]{.8} & \textbf{Class} & \textbf{Method} & \textbf{Statement} \\ \hline +%\multicolumn{4}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.DSoilModel.Data}}} \\ \hline +%CenterCrestLocation & 0\% (0/1) & 0\% (0/6) & 0\% (0/11) \\ \hline +%DSoilModelDataSourceRedirector & 0\% (0/1) & 0\% (0/3) & 0\% (0/24) \\ \hline +%DSoilModelIO & 100\% (1/1) & 60\% (15/259) & 65.7\% (201/306)\\ \hline +%DSoilModelProject & 100\% (1/1) & 62.5\% (45/72) & 56.3\% (272/483)\\ \hline +%DSoilModelStiFileTransformer & 100\% (1/1) & 100\% (5/5) & 86.4\% (19/22)\\ \hline +%SoilSegmentSplitLocation & 0\% (0/1) & 0\% (0/10) & 0\% (0/28) \\ \hline +%SosSoilLayer1D & 100\% (1/1) & 77.8\% (7/9) & 66.7\% (16/24) \\ \hline +%SosSoilProfilesImporter & 100\% (1/1) & 100\% (8/8) & 95.0\% (38/40) \\ \hline +%\multicolumn{4}{|p{120mm}|}{\textbf{\textit{Namespace: Deltares.DSoilModel.Forms}}} \\ \hline +%GrassAssessmentContext & 100\% (1/1) & 100\% (9/9) & 97.8\% (45/46)\\ \hline +%GrassCalculationControl & 100\% (1/1) & 100\% (3/3) & 98.6\% (72/73)\\ \hline +%HydraulicLoadInputControl & 100\% (1/1) & 100\% (9/9) & 99.6\% (238/239)\\ \hline +%MainForm & 100\% (1/1) & 72.2\% (13/18) & 85.8\% (229/267)\\ \hline +%ProjectController & 100\% (1/1) & 83.3\% (10/12) & 86.8\% (46/53)\\ \hline +%RunupControl & 100\% (1/1) & 45.5\% (5/11) & 87.4\% (445/509)\\ \hline +%WaveImpactControl & 100\% (1/1) & 66.7\% (4/6) & 98.0\% (587/599)\\ \hline +%\textbf{Total} & \textbf{100\% (22/22)} & \textbf{92.2\% (178/193)} & \textbf{94.6\% (2245/2372)}\\ \hline +%\end{tabular} +%\end{table} -The code coverage is \textbf{94.6\%}, which largely exceeds the minimum required code coverage of 60\% prescribed in \cite{OverallTestPlanWTI}. +The code coverage of \ProgramName is very low (\textbf{19.8\%}), which is largely below the minimum required code coverage of 60\% prescribed in \cite{OverallTestPlanWTI}. @@ -267,15 +269,15 @@ %------------------------------------------------------------------------------ \chapter{Conclusion} -All the unit and integration tests performed for the validation of \ProgramName pass and cover 94.6\% of the code, so more than the minimum required code coverage of 80\% prescribed in \cite{OverallTestPlanWTI}. +All the unit and integration tests performed for the validation of \ProgramName pass but cover only 19.8\% of the code, so largely less than the minimum required code coverage of 60\% prescribed in \cite{OverallTestPlanWTI}. \\ +A special attention should be therefore paid to increase the code coverage of \ProgramName. -Moreover, the output of 22 test cases (calculated with both kernels \textit{Grass Erosion Outer Slope Runup} and \textit{Grass Erosion Outer Slope Wave Impact}) is compared with the output of \ProgramName \VersionNumber: results are identical. +A complete test of the User Interface has been performed by means of test scripts (see appendix \autoref{app:TestDocument}). Some test scripts failed with respect to the valid and likely intervals of input parameter, the unit or the presence of hint. -Finally, a complete test of the User Interface has been performed by means of test scripts (see appendix \autoref{app:TestDocument}). Some test scripts failed with respect to the valid and likely intervals of input parameter, the unit or the presence of hint. - To conclude, all the requirements of the Functional Design of \ProgramName (listed in \Sref{sec:1.3}) are implemented. The correct functioning of \ProgramName \VersionNumber is ensured with respect to the calculated output, however the User Interface needs some minor improvements. + %------------------------------------------------------------------------------ \chapter{References} \label{chp:References} @@ -288,7 +290,7 @@ \chapter{Overview of the Code Coverage of \ProgramName \VersionNumber on build server TeamCity} \label{app:CodeCoverage} -An overview of the code coverage of \ProgramName \VersionNumber is available on the build server TeamCity which displays the percentage of the code that was tested in each assembly, class, and method. +An overview of the code coverage of \ProgramName \VersionNumber is available on the build server TeamCity which displays the percentage of the code that was tested in method, class, and statement for each assembly. \begin{landscape} @@ -303,17 +305,26 @@ \begin{figure}[H] \centering \includegraphics[width=1.4\textwidth]{pictures/TestCoverageData.png} - \caption{Overview of the code coverage of Deltares.GrasToets.Data} + \caption{Overview of the code coverage of Deltares.DSoilModel.Data} \label{fig:TestCoverageData} \end{figure} \begin{figure}[H] \centering - \includegraphics[width=1.4\textwidth]{pictures/TestCoverageForms.png} - \caption{Overview of the code coverage of Deltares.GrasToets.Forms} + \includegraphics[width=1.4\textwidth]{pictures/TestCoverageForms1.png} + \includegraphics[width=1.4\textwidth]{pictures/TestCoverageForms2.png} + \includegraphics[width=1.4\textwidth]{pictures/TestCoverageForms3.png} + \caption{Overview of the code coverage of Deltares.DSoilModel.Forms} \label{fig:TestCoverageForms} \end{figure} +\begin{figure}[H] + \centering + \includegraphics[width=1.4\textwidth]{pictures/TestCoverageSoilbase.png} + \caption{Overview of the code coverage of Deltares.Soilbase} + \label{fig:TestCoverageSoilbase} +\end{figure} + \end{landscape} Index: doc/System/D-Soil Model - Test Report/pictures/TestCoverageAll.png =================================================================== diff -u Binary files differ Index: doc/System/D-Soil Model - Test Report/pictures/TestCoverageData.png =================================================================== diff -u Binary files differ Index: doc/System/D-Soil Model - Test Report/pictures/TestCoverageSoilbase.png =================================================================== diff -u Binary files differ Index: doc/System/D-Soil Model - Test Report/pictures/TestCoverageForms2.png =================================================================== diff -u Binary files differ