Several years ago, around the time I started teaching Rapid Software Testing, my co-author James Bach recorded a video to demonstrate rapid stress testing. In this case, the approach involved throwing an overwhelming amount of data at an application’s wizard, essentially getting the application to stress itself out.
The video goes on for almost six minutes. About halfway through, James asks, “You might be asking why I don’t stop now. The reason is that we’re seeing a steadily worsening pattern of failure. We could stop now, but we might see something even worse if we keep going.” And so the test does keep going. A few moments later, James provides the stopping heuristics: we stop when 1) we’ve found a sufficiently dramatic problem; or 2) there’s no apparent variation in the behaviour of the program—the program is essentially flat-lining; or 3) the value of continuing doesn’t justify the cost. Those were the stopping heuristics for that stress test.
About a year after I first saw the video, I wanted to prepare a Better Software column on more general stopping heuristics, so James and I had a transpection session. The column is here. About a year after that, the column turned into a lightning talk that I gave in a few places.
About six months after that, we had both recognized even more common stopping heuristics. We were talking them over at STAR East 2009 when Dale Emery and James Lyndsay walked by, and they also contributed to the discussion. In particular, Dale offered that in combat, the shooting might stop in several ways: a lull, “hold your fire”, “ceasefire”, “at ease”, “stand down”, and “disarm”. I thought that was interesting.
Anyhow, here where we’re at so far. I emphasize that these stopping heuristics are heuristics. Heuristics are quick, inexpensive ways of solving a problem or making a decision. Heuristics are fallible—that is, they might work, and they might not work. Heuristics tend to be leaky abstractions, in that one might have things in common with another. Heuristics are also context-dependent, and it is assumed that they will be used by someone who has the competence and skill to use them wisely. So for each one, I’ve listed the heuristic and included at least one argument for not using the heuristic, or for questioning it.
1. The Time’s Up! Heuristic. This, for many testers, is the most common one: we stop testing when the time allocated for testing has expired.
Have we obtained the information that we need to know about the product? Is the risk of stopping now high enough that we might want to go on testing? Was the deadline artificial or arbitrary? Is there more development work to be done, such that more testing work will be required?
2. The Piñata Heuristic. We stop whacking the program when the candy starts falling out—we stop the test when we see the first sufficiently dramatic problem.
Might there be some more candy stuck in the piñata’s leg? Is the first dramatic problem the most important problem, or the only problem worth caring about? Might we find other interesting problems if we keep going? What if our impression of “dramatic” is misconceived, and this problem isn’t really a big deal?
3. The Dead Horse Heuristic. The program is too buggy to make further testing worthwhile. We know that things are going to be modified so much that any more testing will be invalidated by the changes.
The presumption here is that we’ve already found a bunch of interesting or important stuff. If we stop now, will miss something even more important or more interesting?
4. The Mission Accomplished Heuristic. We stop testing when we have answered all of the questions that we set out to answer.
Our testing might have revealed important new questions to ask. This leads us to the Rumsfeld Heuristic: “There are known unknowns, and there are unknown unknowns.” Has our testing moved known unknowns sufficiently into the known space? Has our testing revealed any important new known unknowns? And a hard-to-parse but important question: Are we satisified that we’ve moved the unknown unknowns sufficiently towards the knowns, or at least towards known unknowns?
5. The Mission Revoked Heuristic. Our client has told us, “Please stop testing now.” That might be because we’ve run out of budget, or because the project has been cancelled, or any number of other things. Whatever the reason is, we’re mandated to stop testing. (In fact, Time’s Up might sometimes be a special case of the more general Mission Revoked, if it’s the client rather than ourselves that have made the decision that time’s up.)
Is our client sufficiently aware of the value of continuing to test, or the risk of not continuing? If we disagree with the client, are we sufficiently aware of the business reasons to suspend testing?
6. The I Feel Stuck! Heuristic. For whatever reason, we stop because we perceive there’s something blocking us. We don’t have the information we need (many people claim that they can’t test without sufficient specifications, for example). There’s a blocking bug, such that we can’t get to the area of the product that we want to test; we don’t have the equipment or tools we need; we don’t have the expertise on the team to perform some kind of specialized test.
There might be any number of ways to get unstuck. Maybe we need help, or maybe we just need a pause (see below). Maybe more testing might allow us to learn what we need to know. Maybe the whole purpose of testing is to explore the product and discover the missing information. Perhaps there’s a workaround for the blocking bug; the tools and equipment might be available, but we don’t know about them, or we haven’t asked the right people in the right way; there might experts available to us, either on the testing team, among the programmers, or on the business side and we don’t realize it. There’s a difference between feeling stuck and being stuck.
7. The Pause That Refreshes Heuristic. Instead of stopping testing, we suspend it for a while. We might stop testing and take a break when we’re tired, or bored, or uninspired to test. We might pause to do some research, to do some planning, to reflect on what we’ve done so far, the better to figure out what to do next. The idea here is that we need a break of some kind, and can return to the product later with fresh eyes or fresh minds.
There’s another kind of pause, too: We might stop testing some feature because another has higher priority for the moment.
Sure, we might be tired or bored, but is it more important for us to hang in there and keep going? Might we learn what we need to learn more efficiently by interacting with the program now, rather than doing work offline? Might a crucial bit of information be revealed by just one more test? Is the other “priority” really a priority? Is it ready for testing? Have we already tested it enough for now?
8. The Flatline Heuristic. No matter what we do, we’re getting the same result. This can happen when the program has crashed or has become unresponsive in some way, but we might get flatline results when the program is especially stable, too—”looks good to me!”
Is the application really crashed, or might it be recovering? Is the lack of response in itself an important test result? Does our idea of “no matter what we do” incorporate sufficient variation or load to address potential risks?
9. The Customary Conclusion Heuristic. We stop testing when we usually stop testing. There’s a protocol in place for a certain number of test ideas, or test cases, or test cycles or variation, such that there’s a certain amount of testing work that we do, and we stop when that’s done. Agile teams (say that they) often implement this approach: “When all the acceptance tests pass, then we know we’re ready to ship.” Ewald Roodenrijs gives an example of this heuristic in his blog post titled When Does Testing Stop? He says he stops “when a certain amount of test cycles has been executed including the regression test”.
This differs from “Time’s Up”, in that the time dimension might be more elastic than some other dimension. Since many projects seem to be dominated by the schedule, it took a while for James and me to realize that this one is in fact very common. We sometimes hear “one test per requirement” or “one positive test and one negative test per requirement” as a convention for establishing good-enough testing. (We don’t agree with it, of course, but we hear about it.)
Have we sufficiently questioned why we always stop here? Should we be doing more testing as a matter of course? Less? Is there information available—say, from the technical support department, from Sales, or from outside reviewers—that would suggest that changing our patterns might be a good idea? Have we considered all the other heuristics?
10. No more interesting questions. At this point, we’ve decided that no questions have answers sufficiently valuable to justify the cost of continuing to test, so we’re done. This heuristic tends to inform the others, in the sense that if a question or a risk is sufficiently compelling, we’ll continue to test rather than stopping.
How do we feel about our risk models? Are we in danger of running into a Black Swan—or a White Swan that we’re ignoring? Have we obtained sufficient coverage? Have we validated our oracles?
11. The Avoidance/Indifference Heuristic. Sometimes people don’t care about more information, or don’t want to know what’s going on the in the program. The application under test might be a first cut that we know will be replaced soon. Some people decide to stop testing because they’re lazy, malicious, or unmotivated. Sometimes the business reasons for releasing are so compelling that no problem that we can imagine would stop shipment, so no new test result would matter.
If we don’t care now, why were we testing in the first place? Have we lost track of our priorities? If someone has checked out, why? Sometimes businesses get less heat for not knowing about a problem than they do for knowing about a problem and not fixing it—might that be in play here?
Update: Cem Kaner has suggested one more: Mission Rejected, in which the tester himself or herself declines to continue testing. Have a look here.
Any more ideas? Feel free to comment!
RSS
We have automated that – no need for further testing
Michael,
I like how you've examined the question from several different valid perspectives and raised relevant questions for each. If anyone wants a bite-sized intro to how context-driven-testing thinking is applied, this would makes a nice example.
It is the opposite of a one-size-fits all "You should stop testing when A, B, and C are true" approach (which might be disappointing to someone looking for a nice, easy answer), and yet it is helpful in framing the problem and hopefully getting testers to the right answer for their particular project.
PS, I was enjoying beers with a friend at Brixx in Chapel Hill the other day and thought back to our post-TISQA conference conversation. I enjoyed that.
- Justin Hunter
There is a dangerous version of heuristic 11, The Avoidance/Indifference Heuristic,
which we can call The Hidden Stop Heuristic
It is when the tester seem to be testing, but in reality only performs tests without looking at what happens or what the results are,
e.g. you are executing tests that you know will give the same result as last time.
You have stopped testing, but it looks like you are testing.
Arguments for questioning this heuristic is that sometimes this behavior is demanded, another that the indifferent approach gives diversity to your test approach, which might find new things.
Then we have Heureka! Heuristic (a version of 7. The Pause That Refreshes Heuristic)
which is when you realize something very important, e.g. a new type of error, so you start looking at other features/products for the same type of error,
or you start talking about this very special thing all the time.
Is this really as important as you think? Can you really skip/pause the other things you were supposed to be doing? Maybe one bug report of the same type is enough? Time to move on?
Michael, great list, but for a change I think I have something to add to your well thought out heuristics. I posted my suggestion on my blog, but the gist of it is that I think the seventh heuristic "Pause and Refresh" should be broken out into two, "Change in Priorities" and "Lights are Off".
-Joe Let me know what you think.
Michael -
probably about 8 out of 10 times as testers we would not asked this quesiton at all. Hence answering the question is out of scope. Time given for testing is always less than what is actually needed. Hence testing is invariable cut short. This is out of my experience in IT.
Only time when this quesiton becomes relevant is at the time of estimation when a tester is asked about time required to test (not when testing would be "complete" in some sense). But in this case, the heuristics mentioned will not be of use as they apply to situation where the "thing is in motion".
Shrini
@justin
Thank you for the comment and the compliment. Conversations are the heart of conferences! (Those reading who are interested in combinatorics as testing heuristics should check out Justin's work and his product/company, Hexawise.)
@shrini
Remember, the premise of the stopping heuristics is they could be applied to a single test case or test idea, not just a test cycle or a development project. Second, they assume sapience (that is, that the decision to stop is not determined by an existing decision rule) and they assume that the tester has at least some autonomy, and therefore some influence on the decision when to stop. I like your turn of phrase "thing in motion". The "thing in motion" could be a test cycle, but it could also be a test idea or an observation within one step in an otherwise highly scripted test.
As Justin suggests, that's a context in which context-driven thinking can be applied, even if the rest of the work is not context-driven. As James Bach points out, there are circumstances in which context-driven thinking might be a bad idea, and one of them is the case in which someone else, someone other than the tester, is entirely responsible for the quality of the work. If the tester isn't responsible for the decision, or is non-sapient, then the stopping heuristic is covered by "mission accomplished", "mission revoked", or "time's up".
As for the business of "insufficient time to test" or testing being "cut short", I don't think that's our decision to make in any case. I think you mean "less testing time than I'd like" or "a shorter schedule than is necessary to accomplish this set of tasks" or "less time than we think we need to find the bugs that are there". Yet testing is a service to the project; we don't run it. Our ideals don't matter compared to what our clients want. And they often believe they want to ship more than anything else. That's fine; it's their business, and their risk to assume. What does matter, though, is that we provide the best service we can in the time that is available to us, whether that time is luxuriously long or ludicrously short to match the business' goals, whether it's what we'd like or whether it's "cut short". It's like being a waiter, or a salesman in a clothing store; we don't get to decide how long the client wants our services. (More on that simile at http://www.developsense.com/articles/2009-05-IssuesAboutMetricsAboutBugs.pdf).
@Hannu
Thanks for the suggestion.
If it's been automated, and the automation has been run, that's a case of "mission accomplished", isn't it? And the counter to it is, "So we accomplished some testing mission a mission that we set out some time ago; are we sure that we don't have any important questions that have come up since then?"
—Michael B.
Sometimes when I'm testing I have to stop because I've raised lot of bugs and they are piling up too high. The developer gets overwhelmed and only fixes some of the bugs. I suppose it could be a version of the Dead Horse Heuristic, but perhaps its worthy of its own heuristic. Perhaps "Have a Kit Kat heuristic?"
[...] it is related to the “when do we stop testing” question. I recommend you to read this excellent article from Michael Bolton). Again, there is not one single answer (it would be kind of boring wouldn’t it ?). It really [...]