Open Lecture by James Bach on Software Testing

This YouTube video was my recent introduction to James Bach, the enfant terrible of the “context-driven school of software testing.” (I thank my colleague Gilberto Castañeda, “El Águila de Tenochtitlan,”  for suggesting I watch this video.)

When I write enfant terrible—which I guess means “terrible infant”—I don’t mean an upset child, fists clenched, face red, who stops screaming only to draw breath. We’re talking about an adult here, who on the strength of his reputation, has been invited to speak to students in Estonia. (Does anyone in Estonia even know your name? Not mine.) In this context, we’re talking about someone who upsets some established order by expressing himself enthusiastically and articulately.

I typically find these people quite compelling. Their presence tells us that a discipline has room for finding success without first enduring a Druid-like, decades-long apprenticeship. (Not that Bach advocates ignorance, some kind of Noble Savage approach, or barefoot and wide-eyed laying on of hands. He urges learning all the tools and technologies you can.)

I suspect that when Bach planted himself behind the podium in this college lecture hall, he had a very general outline in mind. In fact, he brought a few slides, which he seems to go through in order. However, he’s not afraid to range far and wide to make his points. The broad outline is defined, but the sentences are JIT. Something he does a lot of is telling stories. (This, too, is an approach that reels me in. The “story” is a way of encapsulating ideas which I can consume like M&Ms. Stories are brain candy.) Much of the presentation consists of Bach’s anecdotes about approaching a software testing situation and turning over rocks to reveal previously visible ugly stuff.

How does he do it?

This is part of what Bach tries to express with the “context-driven testing” label. He does it by recognizing that the testing context, the context of software or system success or failure, is an inclusive one. It generally covers a lot more territory than the problem description makes clear—where “generally”  means something like “while pigs do not fly.” Bach zooms out, or looks at the system from other perspectives, to see potential vulnerabilities. It’s creative. It’s insightful. It provides the stuff of good stories.

One story which stands out as I listen to the presentation for the second time, in the background, is Bach’s summary of Miyamoto Musashi’s Book of Five Rings. Bach summarizes the book as an account of how Musashi survived many duels. How? By using a particular type of sword? A technique? By training with a particular school?

No.

In Bach’s telling, Musashi owed his survival to mastering many weapons (learn all the tools and technologies you can), and then doing whatever was necessary to win.

This will do for now as a metaphor for context-driven testing.

When you hear one of Bach’s stories, and feel that you laugh or thrill with him, this encourages you to believe that you, too, are capable of joining the context-driven brotherhood (a belief Back explicitly encourages elsewhere), and sharing in these penetrating insights. Bach encourages this perception. He begins with simple, clearly defined situations, giving his audience a chance to warm up and stretch before they hear about more complex situations. In his first example, he shows the students some simple code and then discusses all the situations not captured by the code’s logic. After a little stumbling, Bach has probably closely aligned his audience’s understanding of the example with his own. After that, each additional story reinforces their complicity.

There are many more trivial, discrete, and personal reasons I find Bach really compelling. There’s a whole body of shared memes surfacing in his discussion: The Book of Five Rings. Simulated annealing. Artificial intelligence and knowledge representation, circa 1980s. To name a few.

On the other hand, I’ve bought some of my groceries as an advocate for various processes: the SEI CMMI, XP, and a few things in between. Bach is quick to express his disdain for “best practices” and methodologies which seek to eliminate human “squishiness.”

I’m very interested in how I can use the Selenium framework for some automated testing. Bach acknowledges that this approach has its uses, but belongs in the back seat.

As I write, I’m infatuated with Bach and what I understand of context-driven testing. Will this survive more exposure?