diff --git a/project_task_sheets/phase_02/project_phase02_tasks/.gitignore b/project_task_sheets/phase_02/project_phase02_tasks/.gitignore new file mode 100644 index 0000000..44482bd --- /dev/null +++ b/project_task_sheets/phase_02/project_phase02_tasks/.gitignore @@ -0,0 +1,304 @@ +Solution_Phase*_*.pdf +Solution_Phase*_*.zip + +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs +*.lzo +*.lzs +*.slg +*.slo +*.sls + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplot +*.gnuplot +*.table + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.glog +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files +# *.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# newpax +*.newpax + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# svg +svg-inkscape/ + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# titletoc +*.ptc + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices and outlines +*.xyc +*.xyd + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# gummi +.*.swp + +# KBibTeX +*~[0-9]* + +# TeXnicCenter +*.tps + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# Makeindex log files +*.lpz + +# xwatermark package +*.xwm + +# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib +# option is specified. Footnotes are the stored in a file with suffix Notes.bib. +# Uncomment the next line to have this generated file ignored. +#*Notes.bib diff --git a/project_task_sheets/phase_02/project_phase02_tasks/Makefile b/project_task_sheets/phase_02/project_phase02_tasks/Makefile new file mode 100644 index 0000000..1020180 --- /dev/null +++ b/project_task_sheets/phase_02/project_phase02_tasks/Makefile @@ -0,0 +1,21 @@ +phase = 02 +version = 1 +name = MichaelChen + +solutionname = Solution_Phase$(phase)_$(name) +target = $(solutionname)_V$(version).zip +package = $(solutionname).pdf +latexmkflags = + +.PHONY : all dev + +all : $(target) + +dev : latexmkflags = -pvc +dev : all + +$(target) : $(package) + zip -FSr $(target) $(package) + +%.pdf : %.tex + latexmk -jobname="$*" $(latexmkflags) -pdf $< diff --git a/project_task_sheets/phase_02/project_phase02_tasks/Solution_Phase02_MichaelChen.tex b/project_task_sheets/phase_02/project_phase02_tasks/Solution_Phase02_MichaelChen.tex new file mode 100644 index 0000000..d2ce2ab --- /dev/null +++ b/project_task_sheets/phase_02/project_phase02_tasks/Solution_Phase02_MichaelChen.tex @@ -0,0 +1,212 @@ +\documentclass[a4paper]{scrreprt} +\usepackage[left=4cm,bottom=3cm,top=3cm,right=4cm,nohead,nofoot]{geometry} +\usepackage{graphicx} +\usepackage{tabularx} +\usepackage{listings} +\usepackage{enumitem} +\usepackage{subcaption} + +\usepackage{pgf} +\usepackage{tikz} +\usetikzlibrary{arrows,automata} + +\usepackage{xparse} +\usepackage{multirow} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\setlength{\textfloatsep}{16pt} + +\renewcommand{\labelenumi}{\alph{enumi})} +\renewcommand{\labelenumii}{\arabic{enumii}) } + +\newcommand{\baseinfo}[5]{ + \begin{center} + \begin{tabular}{p{15cm}r} + \vspace{-4.5pt}{ \Large \bfseries #1} & \multirow{2}{*}{} \\[0.4cm] + #2 & \\[0.5cm] + \end{tabular} + \end{center} + \vspace{-18pt}\hrule\vspace{6pt} + \begin{tabular}{ll} + \textbf{Name:} & #4\\ + \textbf{Group:} & #5\\ + \end{tabular} + \vspace{4pt}\hrule\vspace{2pt} + \footnotesize \textbf{Software Testing} \hfil - \hfil Summer 2022 \hfil - \hfil #3 \hfil - \hfil Sibylle Schupp / Sascha Lehmann \hfil \\ +} + +\newcounter{question} +\NewDocumentEnvironment{question}{m o}{% + \addtocounter{question}{1}% + \paragraph{\textcolor{red}{Task~\arabic{question}} - #1\hfill\IfNoValueTF{#2}{}{[#2 P]}} + \leavevmode\\% +}{% + \vskip 1em% +} + +\NewDocumentEnvironment{answer}{}{% + \vspace{6pt} + \leavevmode\\ + \textit{Answer:}\\[-0.25cm] + {\color{red}\rule{\textwidth}{0.4mm}} +}{% + \leavevmode\\ + {\color{red}\rule{\textwidth}{0.4mm}} +} + +\newcommand{\projectinfo}[5]{ + \baseinfo{Project Phase #1 - Submission Sheet}{#2}{#3}{#4}{#5} +} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\name{[Add name here]} +\def\group{[Add group here]} + +\begin{document} +\projectinfo{2}{Software Testing - Input Space Partitioning\small}{\today}{\name}{\group} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Task 1 %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{question}{Answer basic questions on ISP-Testing}[3] +\begin{enumerate}[topsep=0pt, leftmargin=*] + \item Define the following terms - related to ISP - in your own words: + \begin{enumerate} + \item Input Domain + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Domain Partition (include the two criteria a partitions needs to fulfill) + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Characteristics + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Equivalence Class + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \end{enumerate} + + \item Which testing situations are suitable for the ISP approach? + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Name and briefly explain the two main strategies to model the input domain. What are their significant pros and cons? + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Using the standard values that may be provided in the specifications is one way to select the actual test values from each partition block. Which other strategies can you consider to derive representative values from a given partition? Name and describe two of them. + \begin{answer} + [TODO: Add answer here] + \end{answer} + +\end{enumerate} +\end{question} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Task 2 %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{question}{Apply ISP-Testing to a sample component}[5] +\begin{enumerate}[topsep=0pt, leftmargin=*] + \item Gather the results of the following sub-tasks as table: + \begin{enumerate} + \item The distinction between the minimum, maximum and remaining \texttt{int} values is a possible interface-based partition for the input parameters \textit{a} and \textit{b}. Come up with another interface-based characteristic and the corresponding partition. + \item The distinction between valid and invalid divisions / modulo operations is a possible functionality-based partition for the input parameters \textit{a} and \textit{b}. Come up with another functionality-based characteristic and the corresponding partition. + \end{enumerate} + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Can you identify any non-valid combinations of blocks from your characteristics? Develop the required constraints that prevent these combinations. + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Derive one representative value for each of the blocks of the exemplary and your own characteristics. Which approach did you choose to select the values? + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Read the \texttt{acts\_user\_guide} to get a basic understanding of how to create a system for ACTS and how to generate test vector sets of this system. + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Create a system named \textit{Phase02\_Task2\_ACTS\_System.txt} based on your characteristics and their representative block values. You can use the \texttt{Enum} type with meaningful names for any characteristics not representable as \texttt{Boolean}, \texttt{Number} or \texttt{Range}. Use ACTS in command line mode to generate the set of test vectors without constraints. + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item In the \texttt{Constraint} section of your system file, add the constraints you identified for valid combinations of blocks, and generate a new set of test vectors. Compare the number of test vectors of the unconstrained and constrained system. Check if the new set of test vectors still contains non-valid combinations, and adapt your constraints if necessary. + \begin{answer} + [TODO: Add answer here] + \end{answer} + +\end{enumerate} +\end{question} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Task 3 %%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\begin{question}{Apply ISP-Testing to your software project}[8] +\begin{enumerate}[topsep=0pt, leftmargin=*] + \item Explain why the selected method is suitable for the input domain model approach (1-2 sentences) + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Identify the input domain of your method (2-3 sentences) + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Similar to task 2, gather the results of the following sub-tasks as shown in Table~\ref{table:example}: + \begin{enumerate} + \item Identify reasonable characteristics of the possible input data + \item Derive sets of equivalence classes from these characteristics (Note: At least one of your partitions must consist of a number of blocks $\geq 3$. Also make sure that you have enough characteristics and corresponding blocks to derive $12$ distinct tests from them later on.) + \end{enumerate} + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Can you identify any non-valid combinations of blocks from your characteristics? (1-2 sentences) + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Derive (at least) one representative value for each equivalence class. Which strategy did you use for the value selection? + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Combine the selected values from the partitions of each input argument to complete test vectors. You can decide whether you want to approach this sub-task manually or using \textit{ACTS} (therefore, only the resulting vectors should be documented). + \begin{answer} + [TODO: Add answer here] + \end{answer} + + \item Create JUnit tests for your method, which trigger test runs with the selected test vectors, and assert each individual output. For the submission, merge all these tests into one \texttt{*.java} file. + \begin{answer} + [TODO: Add answer here] + + \begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip] +/* Add code here */ + \end{lstlisting} + \end{answer} + +\end{enumerate} +\end{question} + +\end{document}