\documentclass[journal,twoside]{IEEEtran} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{graphicx} \usepackage{hyperref} \usepackage{cite} \usepackage{multirow} \usepackage{caption} \captionsetup[table]{skip=10pt} % Adjust the value of skip as needed % Custom title setup \newcommand{\hwtitle}[1]{ \section*{\centering #1} } \begin{document} % Title and author \title{Experiment Results} \author{Ali Can Zeybek, Furkan Akinci} \markboth{Experiment Results}{Ali Can Zeybek, Furkan Akinci} \maketitle % Introduction Section \section{Introduction} In this report we implemented and tested two given programs. Decision table testing, equivalence testing and boundary testing done for each and compared a) different testing techniques for same application b) same testing technique for different programs. % Experiment 1 Section \section{Experiment 1} In this program there are 3 input variables as `number\_of\_items` , `total\_cost` and `delivery\_time`. First two variables are numberic while the third parameter is an enum type. \subsection{Decision Table Testing} Decision tree testing for program 1 generated 12 different test cases, it is expected since for inputs `number\_of\_items` and `total\_cost` generate two possible paths of execution, \bigskip \resizebox{\columnwidth}{!}{$ \text{Branching due to }(\#items) = \begin{cases} \text{True}, & \text{if } number\_of\_items \leq 30, \\ \text{False}, & \text{if } number\_of\_items > 30. \end{cases} $} \bigskip \resizebox{\columnwidth}{!}{$ \text{Branching due to }(total\_cost) = \begin{cases} \text{True}, & \text{if } number\_of\_items \leq 100, \\ \text{False}, & \text{if } number\_of\_items > 100. \end{cases} $} \bigskip while `delivery\_time` can generate 3 values as `NEXT\_DAY`, `SECOND\_DAY` and `THIS\_WEEK`. Hence, 2 x 2 x 3 = 12. \begin{table}[ht] \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|} \hline \textbf{number\_of\_items} & \textbf{total\_cost} & \textbf{delivery\_time} & \textbf{Expected Outcome} \\ \hline $\leq 3$ & $\leq 100$ & NEXT\_DAY & 25 \\ \hline $\leq 3$ & $\leq 100$ & SECOND\_DAY & 10 \\ \hline $\leq 3$ & $\leq 100$ & THIS\_WEEK & number\_of\_items * 1.50 \\ \hline $\leq 3$ & $> 100$ & NEXT\_DAY & 35.00 \\ \hline $\leq 3$ & $> 100$ & SECOND\_DAY & 15.00 \\ \hline $\leq 3$ & $> 100$ & THIS\_WEEK & 10.00 \\ \hline $> 3$ & $\leq 100$ & NEXT\_DAY & number\_of\_items * 6.00 \\ \hline $> 3$ & $\leq 100$ & SECOND\_DAY & number\_of\_items * 2.50 \\ \hline $> 3$ & $\leq 100$ & THIS\_WEEK & 0.00 \\ \hline $> 3$ & $> 100$ & NEXT\_DAY & number\_of\_items * 7.50 \\ \hline $> 3$ & $> 100$ & SECOND\_DAY & number\_of\_items * 3.50 \\ \hline $> 3$ & $> 100$ & THIS\_WEEK & number\_of\_items * 2.50 \\ \hline \end{tabular}} \caption{Test cases generated for decision table testing.} \label{tab:delivery_cost} \end{table} The total test case generation and implementation took 55 minutes. While running 12 test cases took 0.008 seconds \footnote{Test execution times are reported by mvn}, running the full `mvn test` command took 4.59 seconds \footnote{`time mvn test` command used for timekeeping} \footnote{Tested setup has 32G ram Ryzen 7 5800X running Debian 12 and openjdk 17.0.13 } \subsection{Equivalence Testing} For equivalance testing valid and invalid partitions of input variable domains are selected. \subsubsection{Equivalence Partitions} Following are the valid and invalid partitions of program 1. \begin{table}[ht] \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|} \hline \textbf{Input} & \textbf{Partition Type} & \textbf{Partition Condition} & \textbf{Selected Value} \\ \hline number\_of\_items & Valid & $\leq 3$ & 3 \\ \hline & Valid & $> 3$ & 4 \\ \hline & Invalid & $\leq 0$ & -1 \\ \hline total\_cost & Valid & $\leq 100$ & 100 \\ \hline & Valid & $> 100$ & 101 \\ \hline & Invalid & $< 0$ & -2 \\ \hline delivery\_time & Valid & NEXT\_DAY, SECOND\_DAY, THIS\_WEEK & SECOND\_DAY \\ \hline & Invalid & Null or unsupported value & null \\ \hline \end{tabular}} \caption{Partitioning for input values with conditions and selected values.} \label{tab:partitioning} \end{table} \begin{table}[ht] \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|} \hline \textbf{Total Cost} & \textbf{Number of Items} & \textbf{Shipping Time} & \textbf{Expected Outcome} \\ \hline 100.0 & 3 & NEXT\_DAY & 25.0 \\ \hline 150.0 & 3 & SECOND\_DAY & 15.0 \\ \hline 100.0 & 4 & THIS\_WEEK & 0.0 \\ \hline 150.0 & 4 & NEXT\_DAY & 30.0 \\ \hline 100.0 & -1 & NEXT\_DAY & Exception \\ \hline -50.0 & 3 & SECOND\_DAY & Exception \\ \hline 100.0 & 3 & null & Exception \\ \hline \end{tabular}} \caption{Test cases generated for equivalence testing} \label{tab:valid_scenarios} \end{table} The total test case generation and implementation took 40 minutes. While running 7 test cases took 0.028 seconds , running the full `mvn test` command took 6.49 seconds. \section{Boundary Value Testing} For boundary value testing `delivery\_time` does not eligable since enum's do not have boundaries. For other two variables, values just before, exactly and just above valid input range and logical branching boundaries are selected. Those values are {-1,0,1} for both `number\_of\_items` and `total\_cost` while branching boundary values are {3,4} and {100,101} respectively as can seen in \autoref{boundaries} \begin{table}[ht] \centering \begin{tabular}{|l|c|} \hline \textbf{Input} & \textbf{Boundaries} \\ \hline \multirow{5}{*}{number\_of\_items} & -1 \\ \cline{2-2} & 0 \\ \cline{2-2} & 1 \\ \cline{2-2} & 3 \\ \cline{2-2} & 4 \\ \hline \multirow{5}{*}{total\_cost} & -1 \\ \cline{2-2} & 0 \\ \cline{2-2} & 1 \\ \cline{2-2} & 100 \\ \cline{2-2} & 101 \\ \hline delivery\_time & n/a \\ \hline \end{tabular} \caption{Boundary values for input parameters.} \label{boundaries} \end{table} \subsubsection{Test Cases} Using above boundaries following test scenarios generated. \begin{table}[ht] \centering \resizebox{\columnwidth}{!}{% \begin{tabular}{|c|c|c|c|c|} \hline \textbf{number\_of\_items} & \textbf{total\_cost} & \textbf{delivery\_time} & \textbf{Partition Type} & \textbf{Expected Outcome} \\ \hline 3 & 100 & NEXT\_DAY & All Valid & 25.00 \\ \hline 3 & 101 & SECOND\_DAY & All Valid & 15.00 \\ \hline 4 & 100 & THIS\_WEEK & All Valid & 0.00 \\ \hline 4 & 101 & NEXT\_DAY & All Valid & 30.00 \\ \hline -1 & 100 & NEXT\_DAY & Invalid Items & Exception \\ \hline 3 & -50 & SECOND\_DAY & Invalid Cost & Exception \\ \hline 3 & 100 & null & Invalid Delivery & Exception \\ \hline \end{tabular}} \caption{Test cases generated for boundary value testing} \label{tab:test_cases} \end{table} The total test case generation and implementation took 24 minutes. While running 9 test cases took 0.026 seconds , running the full `mvn test` command took 7.01 seconds. % Conclusion Section \section{Conclusion} \end{document}