<s>
A	O
sanity	B-Error_Name
check	I-Error_Name
or	O
sanity	B-Error_Name
test	I-Error_Name
is	O
a	O
basic	O
test	O
to	O
quickly	O
evaluate	O
whether	O
a	O
claim	O
or	O
the	O
result	O
of	O
a	O
calculation	O
can	O
possibly	O
be	O
true	O
.	O
</s>
<s>
It	O
is	O
a	O
simple	O
check	O
to	O
see	O
if	O
the	O
produced	O
material	O
is	O
rational	O
(	O
that	O
the	O
material	O
's	O
creator	O
was	O
thinking	O
rationally	O
,	O
applying	O
sanity	B-Application
)	O
.	O
</s>
<s>
The	O
point	O
of	O
a	O
sanity	B-Error_Name
test	I-Error_Name
is	O
to	O
rule	O
out	O
certain	O
classes	O
of	O
obviously	O
false	O
results	O
,	O
not	O
to	O
catch	O
every	O
possible	O
error	O
.	O
</s>
<s>
The	O
advantage	O
of	O
performing	O
an	O
initial	O
sanity	B-Error_Name
test	I-Error_Name
is	O
that	O
of	O
speedily	O
evaluating	O
basic	O
function	O
.	O
</s>
<s>
In	O
arithmetic	O
,	O
for	O
example	O
,	O
when	O
multiplying	O
by	O
9	O
,	O
using	O
the	O
divisibility	O
rule	O
for	O
9	O
to	O
verify	O
that	O
the	O
sum	O
of	O
digits	O
of	O
the	O
result	O
is	O
divisible	O
by	O
9	O
is	O
a	O
sanity	B-Error_Name
test	I-Error_Name
—	O
it	O
will	O
not	O
catch	O
every	O
multiplication	O
error	O
,	O
however	O
it	O
's	O
a	O
quick	O
and	O
simple	O
method	O
to	O
discover	O
many	O
possible	O
errors	O
.	O
</s>
<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
a	O
sanity	B-Error_Name
test	I-Error_Name
is	O
a	O
very	O
brief	O
run-through	O
of	O
the	O
functionality	O
of	O
a	O
computer	B-Application
program	I-Application
,	O
system	O
,	O
calculation	O
,	O
or	O
other	O
analysis	O
,	O
to	O
assure	O
that	O
part	O
of	O
the	O
system	O
or	O
methodology	O
works	O
roughly	O
as	O
expected	O
.	O
</s>
<s>
A	O
sanity	B-Error_Name
test	I-Error_Name
can	O
refer	O
to	O
various	O
orders	O
of	O
magnitude	O
and	O
other	O
simple	O
rule-of-thumb	O
devices	O
applied	O
to	O
cross-check	O
mathematical	O
calculations	O
.	O
</s>
<s>
If	O
one	O
were	O
to	O
attempt	O
to	O
square	O
738	O
and	O
calculated	O
54	O
,	O
464	O
,	O
a	O
quick	O
sanity	B-Error_Name
check	I-Error_Name
could	O
show	O
that	O
this	O
result	O
cannot	O
be	O
true	O
.	O
</s>
<s>
In	O
software	O
development	O
,	O
a	O
sanity	B-Error_Name
test	I-Error_Name
(	O
a	O
form	O
of	O
software	O
testing	O
which	O
offers	O
"	O
quick	O
,	O
broad	O
,	O
and	O
shallow	O
testing	O
"	O
)	O
evaluates	O
the	O
result	O
of	O
a	O
subset	O
of	O
application	O
functionality	O
to	O
determine	O
whether	O
it	O
is	O
possible	O
and	O
reasonable	O
to	O
proceed	O
with	O
further	O
testing	O
of	O
the	O
entire	O
application	O
.	O
</s>
<s>
Sanity	B-Error_Name
tests	I-Error_Name
may	O
sometimes	O
be	O
used	O
interchangeably	O
with	O
smoke	O
tests	O
insofar	O
as	O
both	O
terms	O
denote	O
tests	O
which	O
determine	O
whether	O
it	O
is	O
possible	O
and	O
reasonable	O
to	O
continue	O
testing	O
further	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
a	O
distinction	O
is	O
sometimes	O
made	O
that	O
a	O
smoke	O
test	O
is	O
a	O
non-exhaustive	O
test	O
that	O
ascertains	O
whether	O
the	O
most	O
crucial	O
functions	O
of	O
a	O
programme	O
work	O
before	O
proceeding	O
with	O
further	O
testing	O
whereas	O
a	O
sanity	B-Error_Name
test	I-Error_Name
refers	O
to	O
whether	O
specific	O
functionality	O
such	O
as	O
a	O
particular	O
bug	O
fix	O
works	O
as	O
expected	O
without	O
testing	O
the	O
wider	O
functionality	O
of	O
the	O
software	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
a	O
sanity	B-Error_Name
test	I-Error_Name
determines	O
whether	O
the	O
intended	O
result	O
of	O
a	O
code	O
change	O
works	O
correctly	O
while	O
a	O
smoke	O
test	O
ensures	O
that	O
nothing	O
else	O
important	O
was	O
broken	O
in	O
the	O
process	O
.	O
</s>
<s>
Sanity	B-Error_Name
testing	I-Error_Name
and	O
smoke	O
testing	O
avoid	O
wasting	O
time	O
and	O
effort	O
by	O
quickly	O
determining	O
whether	O
an	O
application	O
is	O
too	O
flawed	O
to	O
merit	O
more	O
rigorous	O
QA	O
testing	O
,	O
but	O
needs	O
more	O
developer	O
debugging	O
.	O
</s>
<s>
Groups	O
of	O
sanity	B-Error_Name
tests	I-Error_Name
are	O
often	O
bundled	O
together	O
for	O
automated	O
unit	O
testing	O
of	O
functions	O
,	O
libraries	B-Library
,	O
or	O
applications	O
prior	O
to	O
merging	B-General_Concept
development	O
code	O
into	O
a	O
testing	O
or	O
trunk	B-General_Concept
version	O
control	O
branch	B-General_Concept
,	O
for	O
automated	B-Application
building	I-Application
,	O
or	O
for	O
continuous	O
integration	O
and	O
continuous	O
deployment	O
.	O
</s>
<s>
Another	O
common	O
usage	O
of	O
sanity	B-Error_Name
test	I-Error_Name
is	O
to	O
denote	O
checks	O
which	O
are	O
performed	O
programme	O
code	O
,	O
usually	O
on	O
arguments	O
to	O
functions	O
or	O
returns	O
therefrom	O
,	O
to	O
see	O
if	O
the	O
answers	O
can	O
be	O
assumed	O
to	O
be	O
correct	O
.	O
</s>
<s>
The	O
trivial	O
case	O
is	O
checking	O
to	O
see	O
whether	O
the	O
return	B-Language
value	I-Language
of	O
a	O
function	O
indicated	O
success	O
or	O
failure	O
,	O
and	O
to	O
therefore	O
cease	O
further	O
processing	O
upon	O
failure	O
.	O
</s>
<s>
This	O
return	B-Language
value	I-Language
is	O
actually	O
often	O
itself	O
the	O
result	O
of	O
a	O
sanity	B-Error_Name
check	I-Error_Name
.	O
</s>
<s>
For	O
example	O
,	O
if	O
the	O
function	O
attempted	O
to	O
open	O
,	O
write	O
to	O
,	O
and	O
close	O
a	O
file	O
,	O
a	O
sanity	B-Error_Name
check	I-Error_Name
may	O
be	O
used	O
to	O
ensure	O
that	O
it	O
did	O
not	O
fail	O
on	O
any	O
of	O
these	O
actions	O
—	O
which	O
is	O
a	O
sanity	B-Error_Name
check	I-Error_Name
often	O
ignored	O
by	O
programmers	O
.	O
</s>
<s>
These	O
kinds	O
of	O
sanity	B-Error_Name
checks	I-Error_Name
may	O
be	O
used	O
during	O
development	O
for	O
debugging	O
purposes	O
and	O
also	O
to	O
aid	O
in	O
troubleshooting	O
software	O
runtime	B-Library
errors	I-Library
.	O
</s>
<s>
For	O
example	O
,	O
in	O
a	O
bank	O
account	O
management	O
application	O
,	O
a	O
sanity	B-Error_Name
check	I-Error_Name
will	O
fail	O
if	O
a	O
withdrawal	O
requests	O
more	O
money	O
than	O
the	O
total	O
account	O
balance	O
rather	O
than	O
allowing	O
the	O
account	O
to	O
go	O
negative	O
(	O
which	O
would	O
n't	O
be	O
sane	O
)	O
.	O
</s>
<s>
Another	O
sanity	B-Error_Name
test	I-Error_Name
might	O
be	O
that	O
deposits	O
or	O
purchases	O
correspond	O
to	O
patterns	O
established	O
by	O
historical	O
data	O
—	O
for	O
example	O
,	O
large	O
purchase	O
transactions	O
or	O
ATM	O
withdrawals	O
in	O
foreign	O
locations	O
never	O
before	O
visited	O
by	O
the	O
cardholder	O
may	O
be	O
flagged	O
for	O
confirmation	O
.	O
</s>
<s>
Sanity	B-Error_Name
checks	I-Error_Name
are	O
also	O
performed	O
upon	O
installation	O
of	O
stable	O
,	O
production	O
software	B-Application
code	I-Application
into	O
a	O
new	O
computing	O
environment	B-Device
to	O
ensure	O
that	O
all	O
dependencies	B-Application
are	O
met	O
,	O
such	O
as	O
a	O
compatible	O
operating	B-General_Concept
system	I-General_Concept
and	O
link	B-Application
libraries	B-Library
.	O
</s>
<s>
When	O
a	O
computing	O
environment	B-Device
has	O
passed	O
all	O
the	O
sanity	B-Error_Name
checks	I-Error_Name
,	O
it	O
's	O
known	O
as	O
a	O
sane	O
environment	B-Device
for	O
the	O
installation	O
programme	O
to	O
proceed	O
with	O
reasonable	O
expectation	O
of	O
success	O
.	O
</s>
<s>
program	O
is	O
often	O
used	O
as	O
a	O
sanity	B-Error_Name
test	I-Error_Name
for	O
a	O
development	O
environment	B-Device
similarly	O
.	O
</s>
<s>
Rather	O
than	O
a	O
complicated	O
script	O
running	O
a	O
set	O
of	O
unit	O
tests	O
,	O
if	O
this	O
simple	O
programme	O
fails	O
to	O
compile	O
or	O
execute	O
,	O
it	O
proves	O
that	O
the	O
supporting	O
environment	B-Device
likely	O
has	O
a	O
configuration	O
problem	O
that	O
will	O
prevent	O
any	O
code	O
from	O
compiling	O
or	O
executing	O
.	O
</s>
<s>
But	O
if	O
"	O
Hello	O
world	O
"	O
executes	O
,	O
then	O
any	O
problems	O
experienced	O
with	O
other	O
programmes	O
likely	O
can	O
be	O
attributed	O
to	O
errors	O
in	O
that	O
application	O
's	O
code	O
rather	O
than	O
the	O
environment	B-Device
.	O
</s>
