Test Cases Are Not Testing
Test Cases Are Not Testing
“We are seeking a Graduate Test Analyst to write and execute test cases to ensure quality is
delivered to an extensive client base”
“Responsibilities: Assist with requirements gathering and develop test cases that satisfy the
requirements”
“To be successful in this role, the following is required:...To have written manual test cases and
involved in test execution...Proven experience in writing Test Conditions & Test Scripts”
OUR INDUSTRY HAS A TROUBLING OBSESSION WITH TEST CASES. WRITING TEST CASES IS
mentioned in job descriptions as if it were the main occupation of testers. Testers who approach us
for advice too often use phrases like “my test cases” to mean “my work as a tester.”
This test case focus has an innocent basis, and is for the most part well-intentioned. But it has
become toxic to the field and we, the authors, believe it’s one continuing reason why testing
commands so little respect. Test cases are holding us back.
It’s time for an intervention. In this article, we will critically examine the notion of a test case, and the
culture that so often surrounds it. We will show why testing cannot be encoded in test cases, then
suggest an alternative vision based on testing as human performance, rather than on artifacts.
”
unique procedure associated with it. In other situations, test cases may
share procedures and be distinguished by unique data.
Chrome Firefox
Cookies Accepted Pass Pass
Cookies Not Accepted Pass Fail
As above, each step might be called a test case because each step
has a verification operation associated with it. There is no objective,
universal way of accounting for test cases, and hybrids of data-like and
procedure-like cases are often found, wherein a procedure-like test
These are not the only kinds of things called test cases. A tester can
make a loosely structured list of ideas such as “load a corrupted file”
and call them test cases. Considering the variety of things called test
cases around the industry, a definition that covers all of them would
have to be quite general. However, our concern in this article is mostly
with detailed, procedural, documented test cases, and the attitudes
surrounding that kind of test case.
Note: Often test cases are poorly designed. James was once ordered
to create test cases by adding the words “verify that...” in front of the
literal text of each requirement. But that silliness is not our complaint in
this article. The issues we are raising hold even if you assume that
each test case is well-designed. Our claim is that even good test cases
cannot comprise or represent good testing.
“
The Innocent Foundation
Programmers write code. This is, of course, a simplification of what If programmers write
programmers do: modeling, designing, problem-solving, inventing data explicit source code
structures, choosing algorithms. Programming may involve removing or that manifests working
replacing code, or exercising the wisdom of knowing what code not to software, perhaps
testers write explicit test
write. Even so, programmers write programs. Thus, the bulk of their
cases that manifest
work seems tangible. The parallel with testing is obvious: if
testing.
programmers write explicit source code that manifests working
software, perhaps testers write explicit test cases that manifest testing.
”
had won some sort of world championship. The goal of good testing
becomes displaced by a blind mandate.
Test cases are not evil. Neither are french fries nor chocolate candy.
The problem is the obsession that shoves aside the true business of
testing. Chocolate-covered french fries have become the staple diet of
most of our industry. In too many organizations, testing is fat and slow.
We would like to break the obsession, and return test cases to their
rightful place among the tools of our craft and not above those tools. It’s
time to remind ourselves what has always been true: that test cases
neither define nor comprise testing itself. Though test cases are an
occasionally useful means of supporting testing, the practice of testing
does not require test cases.
A test case culture is not one that merely encourages using test cases
as a tool to support testing. In a test case culture, the test cases are
equated to testing; testing is viewed as a mechanistic, clerical task of
executing test cases (analogous to the mechanistic way that a compiler
In a test case culture, the tester is merely the medium by which test
cases do their work. Consequently, while writing test cases may be
considered a skilled task, executing them is seen as a task fit for
novices (or better yet, robots).
!
can be built. But even in the most successful factories you will notice
This case is not a carefully controlled scientific study, but at the very
least this experience undermines the glib assurances by many testing
consultants and authors, going back to Program Test Methods, the first
book on testing, written by William Hetzel in 1973, that written test
cases provide a strong and stable basis for testing.
Testing is the evaluation of a product by learning about it through experiment; by seeing it in action.
The reason we test is to analyse product risk: the danger that the product will cause trouble for its
users or otherwise fail in some way to fulfill its purpose. In other words, we look for anything about the
product that might significantly impair its value. We are looking primarily for “bugs.” We want to find
every important bug, although there will be no way to know for sure that we have succeeded.
Can an algorithm exist that will guarantee we find all the important
bugs? No. This is a matter of basic computing theory (see the Halting
Problem) and the fact that bugs are socially constructed by users
“
rather than being something to do with the essence of the product.
Bugs are not “in” the Bugs are not “in” the product. Bugs are about the relationship between
product. Bugs are the product and the people who desire something from it. It’s possible
about the relationship for a bug to be created or resolved just by changing the stakeholder.
between the product And apart from every other problem, a total bug identification algorithm
and the people who would require a complete, unambiguous, and up-to-date specification
desire something from that is accepted by all stakeholders... and when was the last time you
it. saw one of those?
”
where the bugs are until we discover each one. This unpredictability
requires each tester to be prepared to live in and react to the moment,
regardless of any specific plan. That’s why, just as flying an airplane,
doing surgery, or playing football are rich, complicated performances,
testing is too.
“
There is no objective
method by which we
can draw sharp lines
context how you choose to delineate them.
Testing has many levels, all of which contribute to the success of the
testing enterprise, and very little of which can be encoded:
between individual
1. A person is born. Yes, it’s important to start here. Each of us has a
tests: it is purely a
specific genetic, environmental, and cultural foundation that means
matter of convenience
and context how you we approach testing with a certain mix of talents and a certain
choose to delineate temperament. The fact that James is mathematically inclined leads
them. him to be biased in favor of analytical modeling the things he tests.
”
Other testers may approach the work in a more intuitive or social
way. There is no such thing as purely objective and unbiased
testing. Two test designers, unlike, say, two car engines, cannot be
analyzed and compared in terms of any universal model of testing
performance. Testing talent and temperament cannot be encoded.
”
grasp of different aspects of testing. Each tester’s education is local,
conditioned by the idiosyncrasies of specific technologies,
companies, and projects. And on top of all that, much of testing skill
is comprised of inherently tacit skills such as questioning,
collaboration, and systems analysis, which cannot be made explicit
and mechanical.
No one even attempts to encode the fine details of their own testing
skills.
Oh, and that doesn’t include an even bigger dynamic: the process
of learning the product is also testing. The product is operated,
observed, and evaluated during the learning process. Therefore,
even to the degree that some aspects of testing can be formalized,
that can only occur after a substantial amount of un-encodeable
learning and exploring work has already been done.
5. A tester enacts the testing according to some idea. This is the act
of experimenting on the product, apart from all the processes of
preparation that support or inform it.
“
This interplay cannot be encoded. The most we can do is write
extensive notes about our thinking in every session of testing, but
Although when training
testers it often helps to writing it down, beyond a certain point, interferes with testing. And
focus on each of these even perfect notes about our thinking would not be an encoding of
in isolation, the practice the process of that thinking - in other words we can’t write a
of testing brings them program, while we are working, that duplicates the workings of our
together in an evolving, minds.
exploratory process.
Picture the process of testing: You look; ponder; try something. You
!
”
TESTING TRAPEZE | FEBRUARY 2014
see what happens and ponder that. You have a question, then
41
conceive of an observation that might answer the question. And so
on. Skilled testers perform hundreds of what might seem like
discrete tests in a session. Few of them need to be repeated. Most
tests performed are informed by the results of the previous test. The
value of a test may not be known until it has been performed, or
possibly much later.
Answer #2: the product may be good enough even with poor testing. Quality comes mainly from
Answer #3: it is easy to shift the blame for it not working. Ironically, the inefficiency and
ineffectiveness of test factories can be used as an excuse to invest more in them. Once a gullible
business has been convinced that testing must be structured in test cases, then any problem that
escapes testing seems due to not having enough test cases. If you believe in test factories, any
problems are either down to the factory not being big enough, or bad people who are sabotaging it.
Yet, behind the expensive high walls of test case documentation and the publicly avowed processes
that go with them, broken practices of testing can easily hide, and there is little incentive to improve.
• Training: Systematically train testers, both offline and on the job, with
ongoing coaching and mentoring.
• Metrics: Metrics may be used to provoke inquiry, but do not use them
as the basis of decision rules to control a social system such as
testing. Any metric put in place by management to control people will
be used by people to control management.
”
! TESTING TRAPEZE | FEBRUARY 2014 46