Added phase 04 project template
This commit is contained in:
parent
ce621dd1f4
commit
eda472b3d0
306
project_task_sheets/phase_04/project_phase04_tasks/.gitignore
vendored
Normal file
306
project_task_sheets/phase_04/project_phase04_tasks/.gitignore
vendored
Normal file
@ -0,0 +1,306 @@
|
||||
Solution_Phase*_*.pdf
|
||||
Solution_Phase*_*.zip
|
||||
*.result.txt
|
||||
output.txt
|
||||
|
||||
## 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
|
@ -0,0 +1,53 @@
|
||||
abstract class AbstractStringBuilder {
|
||||
char value[];
|
||||
int count;
|
||||
|
||||
public AbstractStringBuilder(int capacity) {
|
||||
value = new char[capacity];
|
||||
}
|
||||
|
||||
public AbstractStringBuilder append(CharSequence s, int start, int end) {
|
||||
if (s == null)
|
||||
s = "null";
|
||||
if ((start < 0) || (end < 0) || (start > end) || (end > s.length()))
|
||||
throw new IndexOutOfBoundsException(
|
||||
"start " + start + ", end " + end + ", s.length() "
|
||||
+ s.length());
|
||||
int len = end - start;
|
||||
if (len == 0)
|
||||
return this;
|
||||
int newCount = count + len;
|
||||
if (newCount > value.length)
|
||||
expandCapacity(newCount);
|
||||
for (int i=start; i<end; i++)
|
||||
value[count++] = s.charAt(i);
|
||||
count = newCount;
|
||||
return this;
|
||||
}
|
||||
|
||||
void expandCapacity(int minimumCapacity) {
|
||||
int newCapacity = (value.length + 1) * 2;
|
||||
if (newCapacity < 0) {
|
||||
newCapacity = Integer.MAX_VALUE;
|
||||
} else if (minimumCapacity > newCapacity) {
|
||||
newCapacity = minimumCapacity;
|
||||
}
|
||||
value = Arrays.copyOf(value, newCapacity);
|
||||
}
|
||||
|
||||
public int capacity() {
|
||||
return value.length;
|
||||
}
|
||||
|
||||
public abstract String toString();
|
||||
}
|
||||
|
||||
class StringBuilder extends AbstractStringBuilder {
|
||||
public StringBuilder(int capacity) {
|
||||
super(capacity);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return new String(value, 0, count);
|
||||
}
|
||||
}
|
21
project_task_sheets/phase_04/project_phase04_tasks/Makefile
Normal file
21
project_task_sheets/phase_04/project_phase04_tasks/Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
phase = 04
|
||||
version = 1
|
||||
name = MichaelChen
|
||||
|
||||
solutionname = Solution_Phase$(phase)_$(name)
|
||||
target = $(solutionname)_V$(version).zip
|
||||
package = $(solutionname).pdf AbstractStringBuilder.java
|
||||
latexmkflags =
|
||||
|
||||
.PHONY : all dev
|
||||
|
||||
all : $(target)
|
||||
|
||||
dev : latexmkflags = -pvc
|
||||
dev : all
|
||||
|
||||
$(target) : $(package)
|
||||
zip -FSr $(target) $(package)
|
||||
|
||||
%.pdf : %.tex
|
||||
latexmk -jobname="$*" $(latexmkflags) -pdf $<
|
@ -0,0 +1,208 @@
|
||||
\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{4}{Software Testing - Logic Coverage\small}{\today}{\name}{\group}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%% Task 1 %%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{question}{Answer basic questions on Logic Coverage}[3]
|
||||
\begin{enumerate}[topsep=0pt, leftmargin=*]
|
||||
\item Define the following terms in your own words:
|
||||
\begin{enumerate}
|
||||
\item \textit{Predicate}, \textit{Clause}, \textit{Literal}, and \textit{Term}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item \textit{Unique True Point} and \textit{Near False Point}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item \textit{Prime Implicant} and \textit{Redundant Implicant}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
\end{enumerate}
|
||||
\item What is the difference between \textit{Semantic} and \textit{Syntactic Logic Coverage}? Explain both approaches, as well as \textit{one} concrete criterion for each of them.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Explain the terms \textit{Reachability} and \textit{Controllability}. What are their consequences for a source-code based logic coverage approach?
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Both \textit{Active Clause Coverage} (ACC) and \textit{Inactive Clause Coverage} (ICC) feature a \textit{General} and a \textit{Restricted} version of their concepts. Briefly describe the changes that both variations introduce to the basic concept.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\end{enumerate}
|
||||
\end{question}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%% Task 2 %%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{question}{Apply Logic Coverage criteria to a sample program}[5]
|
||||
\begin{enumerate}[topsep=0pt, leftmargin=*]
|
||||
\item Name and briefly describe the specific lines that (directly or indirectly) influence the boolean results of the predicates and clauses in line \textit{10}, \textit{12}, \textit{17}, \textit{20}, \textit{22}, \textit{30}, and \textit{32}.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item To which extent are the predicates influenced by internal states? Which conclusions do you draw for the application of logic coverage criteria to source code in general?
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Provide a set of tests that cover the following predicates and clauses:
|
||||
\begin{enumerate}
|
||||
\item \texttt{(start < 0) || (end < 0) || (start > end) || (end > s.length())} (l.12) based on the \textit{Correlated Active Clause Coverage} (CACC) criterion
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
|
||||
\begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip]
|
||||
/* Add code here */
|
||||
\end{lstlisting}
|
||||
% or: \lstinputlisting[language=Java,belowskip=-0.8\baselineskip]{file_name.java}
|
||||
\end{answer}
|
||||
|
||||
\item \texttt{newCount > value.length} (l.20) for an evaluation to both \textit{true} and \textit{false}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
|
||||
\begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip]
|
||||
/* Add code here */
|
||||
\end{lstlisting}
|
||||
% or: \lstinputlisting[language=Java,belowskip=-0.8\baselineskip]{file_name.java}
|
||||
\end{answer}
|
||||
|
||||
\item \texttt{newCapacity < 0} (l.30) and \texttt{minimumCapacity > newCapacity} (l.32) for an evaluation to \textit{true}. Which requirement(s) does \texttt{value} have to meet so that \texttt{newCapacity < 0} will be satisfied?
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
|
||||
\begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip]
|
||||
/* Add code here */
|
||||
\end{lstlisting}
|
||||
% or: \lstinputlisting[language=Java,belowskip=-0.8\baselineskip]{file_name.java}
|
||||
\end{answer}
|
||||
|
||||
\end{enumerate}
|
||||
\end{enumerate}
|
||||
\end{question}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%% Task 3 %%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{question}{Application to software project}[8]
|
||||
\begin{enumerate}[topsep=0pt, leftmargin=*]
|
||||
\item Pick a method of your given project which contains at least \textbf{2} predicates, with one of these predicates containing at least \textbf{3} clauses. If you cannot find a three-clause-predicate in your code, you can decide to take a nested structure of \textit{if-else} and/or nested \textit{while} expressions instead (at least \textbf{2} levels of nesting). In that case, explain the differences for the application of your logic coverage criteria for nested structures as compared to "flat" predicates.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Using the \textit{EclEmma} tool from phase 03, measure and note down the \textit{instruction}, \textit{branch} and \textit{line coverage} values of the existing test suite regarding your selected method.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Create a set of tests that satisfy \textit{three} of the following logic criteria (pick one concrete criterion from each of your three selected bullet points):
|
||||
\begin{itemize}
|
||||
\item \textit{Predicate Coverage} (PC), \textit{Clause Coverage} (CC), \textit{Combinatorial Coverage} (CoC)
|
||||
\item \textit{Active Clause Coverage} (ACC), \textit{General Active Clause Coverage} (GACC), \textit{Restricted Active Clause Coverage} (RACC), \textit{Correlated Active Clause Coverage} (CACC)
|
||||
\item \textit{Inactive Clause Coverage} (ICC), \textit{General Inactive Clause Coverage} (GICC), \textit{Restricted Inactive Clause Coverage} (RICC)
|
||||
\item \textit{Implicant Coverage} (IC)
|
||||
\item \textit{Multiple Unique True Point Coverage} (MUTP), \textit{Unique True Point and Near False Point Pair Coverage} (CUTPNFP), \textit{Multiple Near False Point Coverage} (MNFP)
|
||||
\end{itemize}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
|
||||
\begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip]
|
||||
/* Add code here */
|
||||
\end{lstlisting}
|
||||
% or: \lstinputlisting[language=Java,belowskip=-0.8\baselineskip]{file_name.java}
|
||||
\end{answer}
|
||||
|
||||
\item Document for each individual test the coverage criterion / criteria it contributes to.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Finally, recheck your method with the new, extended test suite regarding the \textit{instruction}, \textit{branch} and \textit{line coverage} criteria, and explain \textit{how} their values have / have not changed.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\end{enumerate}
|
||||
\end{question}
|
||||
|
||||
\end{document}
|
BIN
project_task_sheets/phase_04/project_phase04_tasks/project_phase04_tasks.pdf
(Stored with Git LFS)
Normal file
BIN
project_task_sheets/phase_04/project_phase04_tasks/project_phase04_tasks.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,208 @@
|
||||
\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{4}{Software Testing - Logic Coverage\small}{\today}{\name}{\group}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%% Task 1 %%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{question}{Answer basic questions on Logic Coverage}[3]
|
||||
\begin{enumerate}[topsep=0pt, leftmargin=*]
|
||||
\item Define the following terms in your own words:
|
||||
\begin{enumerate}
|
||||
\item \textit{Predicate}, \textit{Clause}, \textit{Literal}, and \textit{Term}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item \textit{Unique True Point} and \textit{Near False Point}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item \textit{Prime Implicant} and \textit{Redundant Implicant}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
\end{enumerate}
|
||||
\item What is the difference between \textit{Semantic} and \textit{Syntactic Logic Coverage}? Explain both approaches, as well as \textit{one} concrete criterion for each of them.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Explain the terms \textit{Reachability} and \textit{Controllability}. What are their consequences for a source-code based logic coverage approach?
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Both \textit{Active Clause Coverage} (ACC) and \textit{Inactive Clause Coverage} (ICC) feature a \textit{General} and a \textit{Restricted} version of their concepts. Briefly describe the changes that both variations introduce to the basic concept.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\end{enumerate}
|
||||
\end{question}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%% Task 2 %%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{question}{Apply Logic Coverage criteria to a sample program}[5]
|
||||
\begin{enumerate}[topsep=0pt, leftmargin=*]
|
||||
\item Name and briefly describe the specific lines that (directly or indirectly) influence the boolean results of the predicates and clauses in line \textit{10}, \textit{12}, \textit{17}, \textit{20}, \textit{22}, \textit{30}, and \textit{32}.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item To which extent are the predicates influenced by internal states? Which conclusions do you draw for the application of logic coverage criteria to source code in general?
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Provide a set of tests that cover the following predicates and clauses:
|
||||
\begin{enumerate}
|
||||
\item \texttt{(start < 0) || (end < 0) || (start > end) || (end > s.length())} (l.12) based on the \textit{Correlated Active Clause Coverage} (CACC) criterion
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
|
||||
\begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip]
|
||||
/* Add code here */
|
||||
\end{lstlisting}
|
||||
% or: \lstinputlisting[language=Java,belowskip=-0.8\baselineskip]{file_name.java}
|
||||
\end{answer}
|
||||
|
||||
\item \texttt{newCount > value.length} (l.20) for an evaluation to both \textit{true} and \textit{false}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
|
||||
\begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip]
|
||||
/* Add code here */
|
||||
\end{lstlisting}
|
||||
% or: \lstinputlisting[language=Java,belowskip=-0.8\baselineskip]{file_name.java}
|
||||
\end{answer}
|
||||
|
||||
\item \texttt{newCapacity < 0} (l.30) and \texttt{minimumCapacity > newCapacity} (l.32) for an evaluation to \textit{true}. Which requirement(s) does \texttt{value} have to meet so that \texttt{newCapacity < 0} will be satisfied?
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
|
||||
\begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip]
|
||||
/* Add code here */
|
||||
\end{lstlisting}
|
||||
% or: \lstinputlisting[language=Java,belowskip=-0.8\baselineskip]{file_name.java}
|
||||
\end{answer}
|
||||
|
||||
\end{enumerate}
|
||||
\end{enumerate}
|
||||
\end{question}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%%% Task 3 %%%
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
\begin{question}{Application to software project}[8]
|
||||
\begin{enumerate}[topsep=0pt, leftmargin=*]
|
||||
\item Pick a method of your given project which contains at least \textbf{2} predicates, with one of these predicates containing at least \textbf{3} clauses. If you cannot find a three-clause-predicate in your code, you can decide to take a nested structure of \textit{if-else} and/or nested \textit{while} expressions instead (at least \textbf{2} levels of nesting). In that case, explain the differences for the application of your logic coverage criteria for nested structures as compared to "flat" predicates.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Using the \textit{EclEmma} tool from phase 03, measure and note down the \textit{instruction}, \textit{branch} and \textit{line coverage} values of the existing test suite regarding your selected method.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Create a set of tests that satisfy \textit{three} of the following logic criteria (pick one concrete criterion from each of your three selected bullet points):
|
||||
\begin{itemize}
|
||||
\item \textit{Predicate Coverage} (PC), \textit{Clause Coverage} (CC), \textit{Combinatorial Coverage} (CoC)
|
||||
\item \textit{Active Clause Coverage} (ACC), \textit{General Active Clause Coverage} (GACC), \textit{Restricted Active Clause Coverage} (RACC), \textit{Correlated Active Clause Coverage} (CACC)
|
||||
\item \textit{Inactive Clause Coverage} (ICC), \textit{General Inactive Clause Coverage} (GICC), \textit{Restricted Inactive Clause Coverage} (RICC)
|
||||
\item \textit{Implicant Coverage} (IC)
|
||||
\item \textit{Multiple Unique True Point Coverage} (MUTP), \textit{Unique True Point and Near False Point Pair Coverage} (CUTPNFP), \textit{Multiple Near False Point Coverage} (MNFP)
|
||||
\end{itemize}
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
|
||||
\begin{lstlisting}[language=Java,belowskip=-0.8\baselineskip]
|
||||
/* Add code here */
|
||||
\end{lstlisting}
|
||||
% or: \lstinputlisting[language=Java,belowskip=-0.8\baselineskip]{file_name.java}
|
||||
\end{answer}
|
||||
|
||||
\item Document for each individual test the coverage criterion / criteria it contributes to.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\item Finally, recheck your method with the new, extended test suite regarding the \textit{instruction}, \textit{branch} and \textit{line coverage} criteria, and explain \textit{how} their values have / have not changed.
|
||||
\begin{answer}
|
||||
[TODO: Add answer here]
|
||||
\end{answer}
|
||||
|
||||
\end{enumerate}
|
||||
\end{question}
|
||||
|
||||
\end{document}
|
Loading…
Reference in New Issue
Block a user