If we observe the world through the lens of software testing, we discover that there are lessons all around us we can apply on the job, and one venue that’s packed with these tidbits is the movie theater. Bernie Berger gives examples of a few unlikely yet credible lessons from the language of some classic Hollywood movies—and how we can apply them as we test. Learn about the primary root cause of many software bugs from Office Space; see how the characters in Saving Private Ryan enacted ideas of exploratory testing; discover how to apply the skills of situational awareness from Sneakers; learn about the context of discovery from All the President’s Men; and see a great example of inattentional blindness from Star Trek II: The Wrath of Khan. In addition to learning how these concepts are fundamentally related to testing software, learn how to apply lessons from your everyday life to testing challenges.
3. What Hollywood Can Teach
Us about Software Testing
Bernie Berger
BSC West, Las Vegas
June 8, 2016
4. Five Key Points in this Presentation
Testing Lesson
1. Beware of Off-by-One Errors
2. Enhance Situational Awareness
3. Recognize Inattentional Blindness
4. Test Opportunistically
5. Consider alternate explanations
Movie
• Office Space (1999)
• Sneakers (1992)
• Star Trek II: The Wrath of Khan (1982)
• Saving Private Ryan (1998)
• All the President’s Men (1976)
There are many other lessons all around us, if you learn to appreciate them
7. 1. Off-by-One (& Order of Magnitude) Errors
• Decimal Points in wrong place
• Flag set on when it should be off
• Loop initialized at 1 instead of 0
• Comparison >= instead of just >
• Or vice versa
• One line of code commented out
10. 2. Testing and Situational Awareness
• Situational Awareness is a testing skill
• Be aware of your own biases
• Be aware of whom you can ask questions
• Be aware of the many available sources of information
• Be aware of the many ways tests can fail
• Be aware of your own confusion
• Be aware of tools and technology
Wikipedia:
“One with an adept sense of
situation awareness generally
has a high degree of
knowledge with respect to
inputs and outputs of a
system, an innate "feel" for
situations, people, and
events”
13. 3. Testing and Inattentional Blindness
• We don’t see what we don’t pay
attention to, even if it’s right in
front of our eyes.
• Hard to reproduce bugs happen
when we are not monitoring
relevant variables.
• Defocusing Heuristic
• The flip side of Situational
Awareness
The brain is constantly
bombarded by far more
information that it can handle. If
we tried to process all of it we'd
be completely paralyzed. As a
result we have to attend to only
a small part of what's in front of
us at any given moment.
The brain picks and choses
according to what it thinks is
important. If you change
something that it doesn't think is
important you just literally don't
see it.
16. 4. Opportunistic Exploratory Testing
“Opportunity testing is
any testing that doesn’t
fit the charter of the
session. Since we’re in
doing exploratory testing,
we remind and encourage
testers that it’s okay to
divert from their charter if
they stumble into an off-
charter problem that
looks important.”
-Jonathan Bach, Session
Based Test Management
Pure
Scripted
Pure
Exploration
The “tour bus” Principle
Even people on a tour bus get to step off it occasionally and wander around. The key is not to miss the tour
entirely, nor to fall asleep on the bus.
17. Key Point #5:
Context of Discovery:
Consider alternate explanations
All the President’s Men (1976)
19. 5. Testing and Context of Discovery
• Absolute Language vs. Safety Language
• Consider Alternate Explanations
• Don’t Jump to Conclusions
• Bug Reporting:
• Facts and Data
• Speculative Deduction