Testing is Like Writing Fiction

Previously I wrote about the craft of testing and drew some correlations between fiction writing. Here I’ll continue that theme.

The art of fiction, like the art of stage magicians, is one of directing the audience’s attention to what you want them to see. I very much think the same thing holds true for quality assurance and testing. So when you start to talk about craft in this context that means you figure out a practiced and deliberate way of choosing how to say things in order to get the desired effect.

You control the message by learning to tell a good story. Doing so, however, requires the judicious use of technique.

Fiction and Testing : Creating and Controlling

If you’ve never tried your hand at writing fiction, let me give you some context.

As a writer, a story — whether good or bad — nearly always changes under your hands. The story takes on this atmosphere; a certain feel or vibe, if you will. It can feel like the story is “writing itself” in a very real sense.

That almost sounds creepy. So what is that effect?

That’s you! Your subconscious is sending you smoke signals: ideas seem to come out of nowhere, flash into your mind, and practically demand to be written down. Sometimes this is for the good. An experienced writer recognizes that what was imagined along the way is often stronger than what was originally intended. (Shades of exploratory versus scripted testing!)

But sometimes, the material turning into its own shape, seemingly via its own will, can be destructive. And in these cases, the story collapses into a heap of segments that just don’t seem to fit together very well.

So the problem is that the very power that allows your subconscious to send smoke signals can also send up smoke screens. Those screens obscure, distort, and sometimes entirely subvert your vision of what you’re trying to create.

This same thing can happen in testing as well and certainly in the arena of quality. How quality is determined can often be obscured by varying smoke signals being sent up, all of which make up a smoke screen. Then you have to test your way through that smoke screen, attempting to give shape to the notion of quality that it presumably hides.

The problem is that the quality is in the smoke as well! And that’s often the same thing that occurs with writing. The story itself sometimes merges and mixes with the smoke such that you can’t distinguish them anymore.

So what do you do to get control of this?

  • As an author you can make outlines and try to lock out the kind of change that the smoke often creates.
  • As a tester you can make test approach (a sort of outline) to try and minimize change and flux.

Yet, even with all this outlining, you have to be careful. I specifically call out a test approach there and not a test plan. (See my previous article on the distinction between planning for testing and requiring a test plan.) The reason I say you have to be careful is that writing is as much a process of discovery as it is one of invention. The same could be said for testing. The more serious you are about your writing and the more complex the story you’re trying to tell, the more likely it is to start creating itself in unexpected ways.

I’ve found the same situation plays itself out with testing. No matter how much you’ve planned out, experience with the application starts to broaden out your plan, giving you new ideas and avenues to explore.

There is an inevitable flip side to this, however.

  • Your fictional story can get mired under various and conflicting ideas. You need a strategy to make sure this doesn’t happen.
  • Your testing can get mired under a series of techniques that are used more or less sporadically unless you choose an effective strategy for dealing with this.

This brings up two main components of story-telling: creating plot and controlling plot. In testing, I liken that to creating your tests and controlling your testing.

  • There are ways to create, fix, steer, and discover plots — ways which, over a writing career, you eventually puzzle out for yourself. They aren’t laws. They’re more like an array of choices, things to try, once you’ve put a name to the particular problem your story is facing now.
  • The same applies to testing. You can create, fix, steer, and discover your tests and your overall process of testing. These, too, are usually not laws. They are a choice of methods or techniques (or design patterns!) that you can choose to apply given the particulars of your project or the application you are testing.

In both arenas, that’s what you want to focus on: learning to put a name to the problem you are dealing with and then deciding which, of the whole array of possible choices, is the one that’s appropriate for your story or your test.

To a certain extent, writing, like testing, is exploratory in nature. Writing, like testing, requires that you consider the context you are dealing with and choosing appropriate strategies to get the job done in a way that allows you to be effective and efficient, particularly when it comes time to communicating your vision (story, test results) to other people.

Fiction and Testing : Minimizing the Clutter

In a story, you can often dramatically improve the story idea by trying for the fewest possible scenes that will still tell the story. Many beginners’ stories are padded with unnecessary scenes. The recommendation is usually to study your scene list, trying to eliminate scenes or, perhaps, combine scenes. (Filmmakers have to do this routinely.)

The benefit here is that a story’s pace can really be sharpened by concentrating its events and emotions into the bare minimum of scenes. You can achieve this by cutting material after the story is written but it’s often said to be better to build in economy and speed in the first place.

This same sort of thinking applies to the notion of test conditions or test cases. Sometimes you want to cut as many as you can so that you don’t have test bloat but still convey the correct and necessary information. The idea is to try for the best possible bug finding with the minimum of test cases.

Likewise, with a test approach you often want to convey the minimum amount of information by extracting the stuff that will not add to your test approach and that will, more often than not, prevent it from being read in the first place.

Fiction and Testing : Plans of Action

Sometimes writers recommend making outlines or lists. This is just like some testers who recommend outlining or listing everything about their testing.

The issue there is that outlines scare some writers. They feel that if they have an outline, they’re strait-jacketed into a certain set of actions. The fear is that this will curtail their literary freedom. Writers who have this fear need space to roam in their first drafts. They have a broad idea of the plot of a story but don’t really know what they’re going to say until they say it. For such writers, the structure only emerges as they create, which means two things:

  1. Their first drafts are usually a complete mess.
  2. Only in the second draft do they think about design and pattern.

Some writers, on the other hand, love outlines. They like to have the shape of a book firmly in mind before they start. They make notes, chapter by chapter. They work out all variations of point of view. They detail the narrative design.

Here’s the problem: sometimes things change.

Let’s consider some well-known examples.

  • Herman Melville wrote a large chunk of Moby Dick with the idea that the key protagonist was going to be Bulkington. Read the first couple of chapters and notice all the build-up about this guy. This is the same guy who is then washed overboard the first day the Pequod leaves harbor and is never heard of again. What happened? Apparently Melville had discovered a character named Ahab that he liked a little better.
  • J.R.R. Tolkien has said that while working through The Fellowship of the Ring, a character named Strider confronted the Hobbits in an inn — and that wasn’t part of the original plan. Strider turns out to be Aragorn, the unrecognized king. Aragorn’s restoration to rule is — along with the destruction of the One Ring and the demise of Sauron — the pivotal aspect that moves the plot of the whole The Lord of the Rings trilogy.
  • George Lucas realized that the story he wanted to tell changed a bit between Star Wars: A New Hope and Star Wars: Return of the Jedi, wherein the nascent romance between Luke and Leia had to take a backseat to them being brother and sister. This particularly after the revelation that Darth Vader was really Luke’s father. (Lucas now claims all that was planned; but early concepts show that to be untrue.)
  • J.K. Rowling has stated that she felt the romance between Hermione and Ron really should have been between Hermione and Harry. She simply was juggling various personalities (Ron, Harry, Luna, Ginny, Hermione) and didn’t necessarily have the clear vision of where they should most end up.

So there’s nothing wrong with coming up with a scene list or an outline. However, people who eventually learn the craft of writing realize the provisional and partial nature of these lists and that tends to make them a bit more flexible than a traditional outline.

I would argue this is similar to how you might often want to opt for a test approach rather than a full test plan. The approach can provide enough detail while still allowing you not to spell out everything in detail, allowing you to remain flexible in that very approach.

This is the same logic by which I would argue that tests should be intent-revealing at the business level as opposed to at the user interface implementation level. This is how you stay flexible with your tests, allowing the details of how the tests actually execute to change, while still maintaining the broad outline of what is actually being tested.

In the beginning, so at the end?

In the book Elements of Fiction Writing — Beginnings, Middles & Ends, author Nancy Kress says there are three distinct patterns in stories, particularly from beginning writers, which are then translated into habitual patterns for how they carry out their writing.

One kind of story starts very slowly. Events drag, characters seem confused, and even the prose is a bit clumsy. Then, somewhere around page five for a short story or chapter three for a novel, the writer suddenly hits his stride or finds his voice. The story picks up, and from that point on it becomes more and more interesting.

This writer needs help with beginnings.

I liken this to the test practitioner who is able to come up with the art and perhaps even some of the engineering but lacks a sound focus (theory) on why those things worked this time around (and thus whether they will work another time). They have trouble starting a test effort but they eventually manage to keep going just by hitting their stride.

Kress continues:

A second type of story starts well, with a strong hook and a sure tone. The first scene presents intriguing characters and raises interesting questions. Sometimes even the second scene works well. After that, however, the story flounders. It’s as if the writer didn’t know how to answer the intriguing questions, or develop the characters and their situation. In desperation he plunges ahead anyway, and the story winds down into confusion or starts dragging along at a slow pace and just degrades into pure boredom.

This writer needs help with middles.

Here I liken this to the test practitioner that does have some aspect of theory in place and is able to translate some of that into immediate practice. But the practice is not sustained. And the question then is whether or not this is due to how the practices are being carried out, the theory upon which the practices are based, or the nature of the practices themselves.

Once more from Kress:

Finally, there is the story that sustains interest right to the last scene. The reader is racing along, dying to know how it all comes out or what it all means. But the reader never does actually find anything out. Instead the persistent reader finds a resolution that leaves major plot lines hanging, or leaves characters doing things out of character, or a story that just doesn’t seem to add up to anything meaningful, or ends with events that don’t seem connected to the previous events of the story. The reader feels cheated.

This writer needs help with endings.

Here again you have someone that has some sound theory in place and can take that theory into applied practice but, in the end, the applied practice does not lead to results.

As Kress states, “what you write in the beginning of your story is intimately connected with the middle, which in turn gives birth to the end. A well-written story is a living whole.”

I argue that the same is true of a test effort. It’s a connected whole.

  • A test effort that relies on no theory has a bad habit of producing ad hoc processes that are great for creativity but not so great for method, particularly repeatable method.
  • A test effort that relies solely on theory is great on some aspects of science, but not on the applied parts. Here the creativity is all in the thought and not in the action.

Fiction and Testing : Wrapping It Up

The ending of a story is very important. A climactic moment that occurs entirely off-stage is frustrating to most readers. Nor should the climax speed by in a few easily dismissed paragraphs. This is the point you’ve been building toward for however many pages; the reader, who has invested their reading time, wants to witness the payoff in person and at sufficiently satisfying length. It has to matter; it has to have significance.

The same applies to a test effort. People have waited to get your end results, your final verdict. You need to actually provide one. And that final verdict should be consonant with what you’ve established as part of your test effort up to this point.

In a story, it’s important to identify the moment when all the forces in your story come together to produce the emotional and thematic conclusion. Although that moment comes near the end of the story, experienced authors tend to plan for it in the middle. After mentally identifying those forces, you can work backward, choosing scenes for the middle that will dramatize the inexorable build up of conflicting elements.

Consider an example: Jurassic Park. What I say here applies either to the novel or the film. All of the following forces manage to collide at the end:

  1. The greed of the corporation building a theme park devoted to cloned dinosaurs.
  2. The park engineers engage in secrecy and dangerous cost-cutting at the expense of “getting it done.”
  3. Human error, even on the part of the best-intentioned members of the project team.
  4. The duplicity of a key data-systems employee.
  5. The limitations of even the most sophisticated computer programs.
  6. The endless adaptive resources of nature, which humanity manages to entirely underestimates.

All of these forces are dramatized repeatedly in the middle.

  • We are shown instances of hubris and lack of foresight. (“Nothing can go wrong.” “This is fail-safe.” “The dinosaurs cannot reproduce.”)
  • We are shown engineers and builders cutting corners.
  • We are shown an employee selling corporate secrets.
  • We are shown the computer failing to recognize crucial events because it wasn’t programmed to look for them.
  • We are shown one breed of dinosaur that is more intelligent and fierce than its creators expected.
  • We are shown another dinosaur that breeds even though biological theory (due eto genetic engineering) has declared it impossible. (“That can’t happen.”)

Because we are shown all these things in the middle, we’re well prepared for the ending. We can see from the careful dramatizations that this situation is a disaster waiting to happen. And we’re curious about how the disaster will occur, and when, and to whom. The middle has done its job by maneuvering all the forces into place for an ending that is substantive and that matters.

There’s an underlying point here: you have to set up the conditions whereby the end is not a surprise. It may be unexpected … but on reflection, it’s not a surprise.

This is what a good test effort has to do as well. It does no good to just say, at the end of a test cycle, that the application is not ready to be released, particularly if there was nothing that indicated this in the previous weeks or days of the test and development cycles.

There are competing forces in any engineering project, just as there are in fiction, and those have to be understood and given a focus all through a project’s life cycle (beginning and middle) so that when the project wraps up (the end), people don’t feel like they’ve been blind-sided.

So How Is Testing Like Writing Fiction?

Well, in my career, I’ve found that you can write and sell some fiction by good ol’ gut instinct. And then the problem arises when you try it again: how did you do it before? And how can you do it again?

You want to bring your unconscious craft under greater conscious control, so that you can make choices, not just blunder through until something goes wrong, or right.

The same situation exists in the world of testing. You can test a product by good ol’ gut instinct. You can even do a very good job at it. But how did you do it? Do you know? Can you do it again?

The questions I find often come down to variations on these:

  • Are you one of the writers (or testers) whose instincts are better than their knowledge?
  • Are you one of those who write (test) merrily along mainly when inspiration strikes?
  • Are you one of those whose writing (or testing) bogs down in despair when inspiration inevitably fails?
  • Do you have a defined way of thinking that guides you through the tough times?

In both fiction writing and testing, when initial inspiration and enthusiasm sag, that’s when craft and experience can get you rolling again.

Share

About Jeff Nyman

Anything I put here is an approximation of the truth. You're getting a particular view of myself ... and it's the view I'm choosing to present to you. If you've never met me before in person, please realize I'm not the same in person as I am in writing. That's because I can only put part of myself down into words. If you have met me before in person then I'd ask you to consider that the view you've formed that way and the view you come to by reading what I say here may, in fact, both be true. I'd advise that you not automatically discard either viewpoint when they conflict or accept either as truth when they agree.
This entry was posted in Communication, Testing. Bookmark the permalink.

One Response to Testing is Like Writing Fiction

  1. Jim Hazen says:

    This also applies to the basic principles in Science Fiction writing as well.  First, you never should have been there in the first place.  Second, when you had the chance to get out you didn’t or when you had the chance to kill it you didn’t (take your pick).  Third, somehow by some miracle you,  the protagonist, survive  and/or manage to defeat the antagonist (evil something).  Or did you?

    But good points made about when telling (selling) other people about issues with the item under scrutiny that you have to build a complete and compelling story in order to get action taken.  After all we don’t want to sound like Ben Stein in front of the classroom.  Buehler… Buehler…

Leave a Reply

Your email address will not be published. Required fields are marked *