Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUnit: rename black's rule of testing since we have no source for it #178

Merged
merged 2 commits into from
Jun 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions SUnit/SUnit.tex
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ \subsection{TestResource}

%=================================================================
\section{Advanced features of SUnit}
In addition to \ct{TestResource}, the current version of \sunit contains assertion description strings and logging support.
In addition to \ct{TestResource}, the current version of \sunit contains assertion description strings and logging support.
% Currently broken as of 6.0, readd when fixed: "and resumable test failures."

%---------------------------------------------------------
Expand Down Expand Up @@ -708,11 +708,6 @@ \section{Some advice on testing}
% What specifically should I do or not do?
% Give an example!}

%\item[Do not over-test.] Try to build your tests so that they do not
% overlap. It is annoying to have many tests covering the same
% functionality, because one bug in the code will then break many tests at the same time.
% This is covered by Black's rule, below.

\index{Feathers, Michael}
\item[Feathers' Rules for Unit tests.]
Michael Feathers, an agile process consultant and author, writes:\footnote{See \url{https://web.archive.org/web/20060212020903/http://www.artima.com/weblogs/viewpost.jsp?thread=126923}.}
Expand Down Expand Up @@ -744,7 +739,7 @@ \section{Some advice on testing}
Such tests might exercise many classes, and might take a long time to run because they touch the file system.
You can write them using \sunit, but you won't want to run them each time you make a small change, so they should be separated from the true unit tests.

\item[Black's Rule of Testing.]
\item[One Test per Property.]
For every test in the system, you should be able to identify some property for which the test increases your confidence.
Obviously there should be no important property that you are not testing.
This rule states the less obvious fact that there should be no test that does not add value to the system by increasing your confidence that a useful property holds.
Expand Down