Skip to content
Snippets Groups Projects
Commit 67d0b8f5 authored by W. Spencer Smith's avatar W. Spencer Smith
Browse files

Updates to L31 to remove uncovered slides, update content of L32 (white box testing)

parent 1ffc2080
No related branches found
No related tags found
No related merge requests found
No preview for this file type
...@@ -352,59 +352,5 @@ validity ...@@ -352,59 +352,5 @@ validity
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Fault Testing}
\begin{itemize}
\item Common analogy involves planting fish in a lake to estimate the fish population
\item T = total number of fish in the lake (to be estimated)
\item N = fish stocked (marked) in the lake
\item M = total number of fish caught in lake
\item M' = number of marked fish caught
\item T = (M - M')*N/M'
\item Artificially seed faults, discover both seeded and new faults, estimate the total number of faults
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Fault Testing Continued}
\begin{itemize}
\item Method assumes that the real and seeded faults have the same distribution
\item Hard to seed faults
\begin{itemize}
\item By hand (not a great idea)
\item Independent testing by two groups and obtain the faults from one group for use by the other
\end{itemize}
\item Want most of the discovered faults to be seeded faults
\item If many faults are found, this is a bad thing
\item The probability of errors is proportional to the number of errors already found
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Exam Question: Homework}
After completion of a complex software project, two independent groups test
it. The first group finds 300 errors and the second group finds 200 errors. A
comparison of the errors discovered by the two teams shows that they found the
same error in 50 cases. What is the range that estimates the number of errors in
the original software project?
% M1 = 300, M1'=50, N1 = 200, T1 = 1000
% M2 = 200, M2'=50, N2 = 300, T2 = 900
\be[A.]
\item 900--1000 %answer
\item -17--25
\item 600--1500
\item 0--150
\item 150--250
\ee
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document} \end{document}
No preview for this file type
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
\mode<presentation>{} \mode<presentation>{}
\input{../def-beamer} \input{../def-beamer}
\Drafttrue \Draftfalse
\newcommand{\topicTitle}{32 White Box Testing (Ch.\ 6)} \newcommand{\topicTitle}{32 White Box Testing (Ch.\ 6)}
\ifDraft \ifDraft
...@@ -77,29 +77,23 @@ TBD ...@@ -77,29 +77,23 @@ TBD
{ {
\begin{itemize} \begin{itemize}
\item Problems with GitLab - now resolved \item A4: Due April 9 at 11:59 pm
\item A4 \item No classes on Thurs, Mar 29 or Fri, Mar 30
\item Final tutorial (examination review)
\bi \bi
\item \href{https://gitlab.cas.mcmaster.ca/Group7/Battleship}{Sample Design and \item Monday, Mar 26
Documentation} \item Tuesday, Mar 27
\item \structure{Marking scheme has 175 potential marks (8.75/5)} \item Friday, Apr 6 (no tutorial on Fri, Mar 30)
\item \structure{Consider using a tool for code coverage metrics}
\bi
\item Coverage.py
\item JCov
\item etc.
\ei
\item Due April 3 at 11:59 pm
\ei \ei
\item Course evaluations \item Course evaluations
\bi \bi
\item \href{https://evals.mcmaster.ca/login.php}{https://evals.mcmaster.ca/} \item \href{https://evals.mcmaster.ca}{https://evals.mcmaster.ca}
\item Opens: 10:00 am, Monday, March 27 \item Start: Tues, Mar 27, 10:00 am
\item Closes: 11:59 pm, Monday, April 10 \item Close: Tues, Apr 10, 11:59 pm
\item \textbf{Your participation is highly valued!} \item \textbf{Your participation is highly valued!}
\item Hi class participation means bonus marks \item \emph{Grade bonus for class participation!}
\ei \ei
\end{itemize} \end{itemize}
} }
...@@ -110,60 +104,25 @@ TBD ...@@ -110,60 +104,25 @@ TBD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame} \begin{frame}
\frametitle{Continuous Integration Testing} \frametitle{Quality Testing: Installability}
\begin{itemize} \begin{itemize}
\item \structure{What is continuous integration testing?} \item \structure{How might you test installability?} %virtual machines, docker
\end{itemize} \end{itemize}
\end{frame} \end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame} \begin{frame}
\frametitle{Continuous Integration Testing} \frametitle{Bugs Per Lines of Code}
\href{http://amartester.blogspot.ca/2007/04/bugs-per-lines-of-code.html}{Some numbers}
\begin{itemize} \begin{itemize}
\item Information available on \item Indust avg: 15--50 errors per 1000 lines of delivered code
\href{https://en.wikipedia.org/wiki/Continuous_integration}{Wikipedia} \item Microsoft apps: 10--20 errors per 1000 lines in-house testing, 0.5/1000 for
\item Developers integrate their code into a shared repo frequently (multiple released product
times a day) \item Harlan Mills: 3/1000 in-house testing, 0.1/1000 released product
\item Each integration is automatically accompanied by regression tests and \item Space shuttle: 0/500 000
other build tasks
\item Build server
\bi
\item Unit tests
\item Integration tests
\item Static analysis
\item Profile performance
\item Extract documentation
\item Update project web-page
\item Portability tests
\item etc.
\ei
\item Avoids potentially extreme problems with integration when the baseline and
a developer's code greatly differ
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Continuous Integration Tools}
\begin{itemize}
\item Gitlab
\bi
\item Example at
\href{https://gitlab.cas.mcmaster.ca/andrem5/RogueReborn/pipelines}{Rogue
Reborn}
\ei
\item Jenkins
\item Travis
\item \href{https://www.docker.com/}{Docker}
\bi
\item Eliminates the ``it works on my machine'' problem
\item Package dependencies with your apps
\item A container for lightweight virtualization
\item Not a full VM
\ei
\end{itemize} \end{itemize}
\structure{How do we estimate these numbers?}
\end{frame} \end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...@@ -416,6 +375,64 @@ application or version of the application ...@@ -416,6 +375,64 @@ application or version of the application
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{White-box Coverage Testing}
\begin{itemize}
\item (In)adequacy criteria - if significant parts of the program structure are not tested, testing is inadequate
\item Control flow coverage criteria
\begin{itemize}
\item Statement coverage
\item Edge coverage
\item Condition coverage
\item Path coverage
\end{itemize}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Statement-Coverage Criterion}
\begin{itemize}
\item Select a test set $T$ such that every elementary statement in $P$ is
executed at least once by some $d$ in $T$
\item An input datum executes many statements - try to minimize the number of
test cases still preserving the desired coverage
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Example}
\includegraphics[scale=0.5]{../Figures/ExampleStatementCoverageOnlyCode.png}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Example}
\includegraphics[scale=0.5]{../Figures/ExampleStatementCoverage.png}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle{Weakness of the Criterion}
\includegraphics[scale=0.6]{../Figures/WeaknessStatementCoverageOnlyCode.png}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document} \end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment