Académique Documents
Professionnel Documents
Culture Documents
Armour
I
n The Art of Software Testing, constructed intellectual models. have found out earlier but didn’t
Glenford Myers asserted that It is not possible to be wholly due to some negligence on our
“…the most important con- deterministic about testing since part. However, exposing things we
siderations in software testing we don’t know what to be deter- didn’t know we didn’t know by
are issues of economics and ministic about. Testing, probably dynamically executing the knowl-
human psychology” [6]. In fact, more than any other activity in edge contained in a system is not
the most important considera- itself a bad thing. We’ve stopped
tions of any software development punishing testers for finding
practice are (or should be) issues defects, though rewarding them
of economics and human psy- for the same has its perils.
chology. Particularly psychology. Sometimes the most effective
The challenge in testing sys- and efficient way to find certain
tems is that testers are trying defects is to test for them. This
to develop a way to find out does not in any way substitute
if they don’t know that they for good engineering practices
don’t know something. This and feedback mechanisms such
is equivalent to a group of as inspections. Indeed, without
scientists trying to devise an such processes in place and
experiment to reveal something working, any attempt at dynamic
they are not looking for. It is testing quickly becomes over-
extremely difficult to do. In fact, whelmed and quite ineffective. But
as Thomas Kuhn pointed out, the there are certain kinds of problems
image we have of the scientist that are very difficult to identify
boldly going into uncharted terri- analytically. Some companies I
tory and finding out things we software development, is about work with perform enormous
never knew is at odds with the discovery. In the bad old days, quantities of integration testing.
reality [5]. Scientists almost always people were sometimes punished They must do this because they
find out things they already know. for finding defects, since defects have enormously integrated sys-
The hypothesis must come before were considered bad. In my previ- tems and it is very difficult to
the experiment to confirm (or ous column, I pointed out that determine their behavior in opera-
deny) it. In fact, it is almost rou- even the word “defect” is a little, tion unless you execute them in
tine for scientists to ignore results well, defective [2]. By the time we some controlled fashion. Simula-
PETER HOEY
that get in the way of their pre- get around to dynamic testing tion is taking over traditional test-
conceived notions and carefully there may be things we should ing in some of these areas, but a
close look at what is actually done 10% of our brains. This is not driving a car, and found that you
in an executable simulation shows true. While some physical parts have driven, accident-free, all the
it is not unlike testing in the way it of our brains may be more elec- way to your destination but were
is set up and run. In fact, I think trochemically active than others quite (consciously) unaware of
the boundaries between a “real” at different times, parts of our performing the activities involved
system and a simulator and the brains do not simply shut down. in driving? Obviously when we do
execution of “tests” against the real All of our brain is active all of this we are not unconscious in the
system and the execution of a sim- the time. The conscious inten- sense of being in a coma, other-
ulation will become progressively tional introspective part of the wise the journey would not have
blurred. In both cases the real and brain, however, has (and needs) been accident-free. The complex
the simulation system will repre- only limited access to what is process of navigating, steering, and
sent some subset of the necessary going on. It would be extremely avoiding accidents was all the way
knowledge that has been made tedious to require our brains to down there with the pancreatic
executable, which is what, of consciously process, say, our pan- function. There is an enormous
course, software is anyway. creatic function in order to make amount of processing that occurs
it work. What we call “conscious- inside our skulls of which we are
Testing vs. Inspections? ness” is a very small part of what quite unaware at an intentional
T
here is no doubt that is going on inside our heads. Our level. And this capability can be
inspections can be very consciousness is that part of our leveraged. Bertrand Russell, the
effective and must be brain function that is self-aware. English mathematician and
used if we wish to obtain This capability is inherent to philosopher, asserted he never
high-quality software. But being human, and there is evi- attempted to consciously solve a
despite evidence of the “superior- dence that it differentiates us math problem. He would read
ity” of inspections and other from other animals. In fact, it is about it, absorb as much informa-
quality assurance devices over reflected in the very name of the tion as he could, and then go to
dynamic testing, luckily we don’t human race. The Latin label for sleep. On awakening, he usually
have to choose between them. the current version of the human found he had the answer figured
We can have and we need both race is not Homo Sapiens as is out. Brains can do that.
effective inspections and effective often cited—it is Homo Sapiens So what does this have to do
testing. No matter how good we Sapiens. This means almost liter- with software testing?
get at managing other aspects of ally “man who thinks about
development, it is not likely that thinking” (or perhaps man who Testing Strategies
execution of software systems thinks twice?). Much of what passes for method
under controlled conditions for Other animals undoubtedly in testing involves heuristic
the purpose of determining their think, but they don’t appear to strategies. We selectively test
validity will disappear in the near think about thinking as an activ- complex predicate logic, we cre-
future. So, given that testing is ity. They don’t introspect. The ate test cases that span the classes
probably here to stay, how do we most obvious and well-known of inputs and outputs, we con-
create tests for things of which type of thought is this conscious struct combinations of condi-
we are unaware? intentional kind, but there are tions, we press the system to its
other kinds and other levels. Have boundaries both internally and
10% of Your Brain you ever puzzled over a problem, externally, we devise weird com-
It has been said that we only use or wrestled with a worry while binations of situations that might
T
he first hypothesis shows high-density knowledge within a test for the number set 3, 5, 4?
us why, sometimes, we our system. We are most likely to Or how about the number set 4,
cannot test for and detect make mistakes where complex 5, 6 or 6, 4, 5?
defects in the lab. If we knowledge is clustered. Where
A
cannot duplicate, in sufficient things are complicated we usually s shown in the table
detail and with sufficient control, understand them less and our here, the choices in this
the situations that will occur in ignorance (read defects) is usually case are between chang-
the customer’s environment when higher. ing only the order of the
we release the software, we cannot But there is another aspect to inputs, only their values or
expose these defects. Of course, consider. I have found good changing both order and value at
the customer’s environment, not testers have a “nose” for testing. the same time. Is it “better” to