Exploratory Testing in An PDF
Exploratory Testing in An PDF
Agile Context
Elisabeth Hendrickson
Quality Tree Soft ware, Inc.
www.qualitytree.com
[email protected]
Chapter 1: Explorations
“Exploratory Testing” is a style of testing in which we learn about
the behavior of a system by designing a small test, executing it
immediately, using the information gleaned from the last test to
inform the next. We continue
that rapid cycle of design a Exploratory Testing is:
test, execute it, observe until Simultaneously learning
we've characterized the about the system
capabilities and limitations of while designing and
the system with respect to a
executing tests, using
charter, or mission.
feedback from the last
Let's examine each of these test to inform the
three key aspects in more
next.
detail.
1. Designing.
Good testers know a lot about test design. Test design involves
identifying interesting things to vary, and interesting ways in which
to vary them. We can design tests around data: boundaries, special
characters, long inputs, nulls, number fields with 0, etc. We can also
design tests around sequences and logic using state models,
sequence diagrams, flow charts, decision tables, and other design
artifacts. All the traditional test design techniques apply. The
difference is that while we might make notes about the tests we're
designing, we aren't writing down formal test cases.
2. Executing.
3. Observing / Learning.
We’re observing what the system does and does not do. We discover
how it operates. We find its quirks and peculiarities while
characterizing its capabilities and limitations. Further, we’re learning
the system well enough that we can reflect our observations back to
the rest of the team. The information that our explorations uncover
will help to move the project forward, but only if we can report it out
in a way that the rest of the team can digest.
Check
ed
+ Exp Two Sides of Testing: Checking and Exploring
lored
= Tes There is a perpetual ongoing debate in the testing community: Does
ted
"good testing" emphasize executing a comprehensive set of scripted
tests designed from the requirements of the system? Or should we
...
--Ward Cunningham
Tests as Experiments
When we design tests while exploring, we have a hypothesis about
how the software will behave: perhaps we suspect the software will
exhibit a particular type of error, or perhaps we are seeking to
confirm how the software works.
The more we learn about how the system works, and the
circumstances under which it misbehaves, the better we are at
designing good experiments that yield useful information.
Testing But James doesn’t put a shoe on the keyboard because he’s trying to
Tool? come up with wacky random stuff. He does it because he has
noticed that some software exhibits bad behavior when it receives
too many key inputs at one time. Placing a cat on the keyboard, or
handing the keyboard to a 2-year-old, might result in similar
behavior. But a shoe or a book is usually more handy.
______________________________________________________
Unbreakable
I first visited Atomic Object in Grand Rapids, Michigan a few years ago.
After initial introductions, Karlin Fox took me over to a workstation and
introduced me to a system that they had recently put into production.
Next I channelled my inner 3 year old and tried interrupting the system by
pulling out the media and hitting keys randomly. For every scenario I
tried, the system responded in a reasonable way.
Curious as to how the team had created software that I could not break, I
asked about the process the team used. Karlin told me that they had an
exploratory tester on the team.
Chapter 2: Organized
Explorations: Charters
and Sessions
In a letter dated June 20, 1803, Thomas Jefferson, the 3rd President
of the United States, gave the explorers Lewis and Clark a mission:
The Object of your mission is to explore the Missouri river & such
principal stream of it as by its course and communication with
the waters of the Pacific ocean, whether the Columbia, Oregon,
Colorado or any other river may offer the most direct &
practicable water communication across this continent for the
purpose of commerce.
Earlier in that same letter letter, Jefferson told Lewis and Clark what
they would have to work with:
yield in his department; and from him also you will receive
authority to engage among our troops, by voluntary agreement,
the attendants above mentioned; over whom you, as their
commanding officer, are invested with all the powers the laws
give in such a case.
• We can use tools to help us; however, the most important tool we
carry is the one between our ears.
• Finally, if the map and the territory differ, believe the territory.
Explore area
with resources
to discover information
Good Charters
A good charter offers direction without over-specifying test actions.
As an example, the following isn't a charter; it's a test case.
Too Specific
with the value "O'Malley"
to discover if the profile
edit feature can handle
names with apostrophes
When charters are too specific, they become just a different way of
expressing individual tests. If they are tests that we need to repeat
with every iteration, they should be automated.
By contrast, charters that are too broad run the risk of not providing
the most important information. Like a story that is too big and
ambiguous, we don't know how to tell when we're done.
For example, the following charter calls for exploring the entire
system with a large and undefined set of resources. The result is so
vague that we could spend weeks investigating it and still not be
sure we discovered all the important risks and vulnerabilities.
Explore inputs
with buffer overflow exploits
Chapter 3: "Recon"
In their “ET with Subtitles” video, James and Jon Bach perform what
they call a “Recon” session on an “Easy Button,“ a novelty toy with a
single button that, when pressed, prompts the device to say, “That
was easy.”
Since we just discussed charters that are too general in the last
section, it may seem that this charter contradicts the advice on
focusing charters on a given area, resource, or type of information.
The recon session sets the stage for all the other sessions and
missions.
Chapter 4: “Variables”
If you’re a programmer, a variable is a named location in memory.
You declare variables with statements like:
int foo;
Subtle variables are the ones we often miss when analyzing the
software to design tests. Consider for example the Therac-25 case
that Nancy Leveson describes in her book Safeware.
Further, Leveson found that every 256th time the setup routine ran,
it bypassed an important safety check. That’s yet another subtle
variable: the number of times the setup routine ran.
The more we look for variables, the more we’ll find. They’re
everywhere.
In this third and final session of this workshop, we will exercise just
one class of variables that you (no doubt) discovered in the second
session: timing and sequence related variables.
The Scrabble Flash game is particularly well suited for state analysis
because so much of its functionality involves timing. The games are
timed. The tiles communicate with one another, and communication
always involves timing.
Exploring States
State modeling offers an analysis tool for discovering surprises
related to timing.
Off On
At some point the thing is off. And then at some point it comes on.
And then it goes off again. Every single electronic system from a
FaceBook widget to an electronic book reader to a word processor
to a Scrabble Flash tile could be described by this simple model.
So what good is it? What is the point of thinking about such a trivial
generic model?
Consider all the ways that a Scrabble Flash tile can go from on to
off, and from off to on. It's quite a list. A tile turns on by pressing
the button on the front. It can turn off by timing out, by pressing
Identifying States
One of the biggest challenges with mapping states when we're
exploring is knowing when we've found one worth putting on our
map.
Note that this is very different behavior from when Scrabble Flash is
waiting for the player to choose a game. Then, changing the
sequence of the tiles has a different result.
Or perhaps:
Or even:
Appendix: Resources
Agans, D. (2002). Debugging: The Nine Indispensable Rules for
Finding Even the Most Elusive Software and Hardware Problems:
AMACOM.
Bach, J., & Bach, J. (2009). "ET with Subtitles" video: http://
www.youtube.com/watch?v=Vy0I2SB5OLo
Gause, D. C., & Weinberg, G. M. Are Your Lights On? : How to Figure
Out What the Problem Really Is.
Iberle, K. (2002). "But Will It Work for Me?" Proceedings of the Pacific
Northwest Quality Conference. Available online: http://
www.kiberle.com/articles.htm
Meyers, G. (1979). The Art of Software Testing: John Wiley & Sons.
Seashore, C. N. (1997). What Did You Say?: The Art of Giving and
Receiving Feedback: Bingham House Books.
Time and Date Timeouts Time Difference between Machines Crossing Time Zones Leap Days
Always Invalid Days (Feb 30, Sept 31) Feb 29 in Non-Leap Years Different Formats
(June 5, 2001; 06/05/2001; 06/05/01; 06-05-01; 6/5/2001 12:34) Daylight Savings
Changeover Reset Clock Backward or Forward
Numbers 0 32768 (215) 32769 (215 + 1) 65536 (216) 65537 (216 +1) 2147483648 (231)
2147483649 (231 + 1) 4294967296 (232) 4294967297 (232 + 1) Scientific Notation
(1E-16) Negative Floating Point/Decimal (0.0001) With Commas (1,234,567)
European Style (1.234.567,89) All the Above in Calculations
Strings Long (255, 256, 257, 1000, 1024, 2000, 2048 or more characters) Accented Chars
(àáâãäåçèéêëìíîðñòôõöö, etc.) Asian Chars ( ) Common Delimiters and Special
Characters ( “ ‘ ` | / \ , ; : & < > ^ * ? Tab ) Leave Blank Single Space Multiple Spaces
Leading Spaces End-of-Line Characters (^M) SQL Injection ( ‘select * from customer )
With All Actions (Entering, Searching, Updating, etc.)
General Violates Domain-Specific Rules (an ip address of 999.999.999.999, an email address with
no “@”, an age of -1) Violates Uniqueness Constraint
Web Tests
Navigation Back (watch for ‘Expired’ messages and double-posted transactions) Refresh Bookmark
the URL Select Bookmark when Logged Out Hack the URL (change/remove
parameters; see also Data Type Attacks) Multiple Browser Instances Open
Input See also Data Type Attacks HTML/JavaScript Injection (allowing the user to enter
arbitrary HTML tags and JavaScript commands can lead to security vulnerabilities) Check
Max Length Defined on Text Inputs > 5000 Chars in TextAreas
Preferences Javascript Off Cookies Off Security High Resize Browser Window Change Font Size
Testing Wisdom
A test is an experiment designed to reveal information or answer a specific question about the software or
system. Stakeholders have questions; testers have answers. Don’t confuse speed with progress. Take a
contrary approach. Observation is exploratory. The narrower the view, the wider the ignorance. Big
bugs are often found by coincidence. Bugs cluster. Vary sequences, configurations, and data to increase
the probability that, if there is a problem, testing will find it. It’s all about the variables.
This cheat sheet includes ideas from Elisabeth Hendrickson, James Lyndsay, and Dale Emery
www.qualitytree.com
Copyright © 2006 Quality Tree Software, Inc.
Test Heuristics Cheat Sheet
Heuristics & Frameworks
Heuristics
Variable Analysis Identify anything whose value can change. Variables can be obvious, subtle, or hidden.
Touch Points Identify any public or private interface that provides visibility or control. Provides places to
provoke, monitor, and verify the system.
Boundaries Approaching the Boundary (almost too big, almost too small), At the Boundary
Goldilocks Too Big, Too Small, Just Right
CRUD Create, Read, Update, Delete
Follow the Data Perform a sequence of actions involving data, verifying the data integrity at each step.
(Example: Enter → Search → Report → Export → Import → Update → View)
Configurations Varying the variables related to configuration (Screen Resolution; Network Speed, Latency,
Signal Strength; Memory; Disk Availability; Count heuristic applied to any peripheral such as 0,
1, Many Monitors, Mice, or Printers)
Interruptions Log Off, Shut Down, Reboot, Kill Process, Disconnect, Hibernate, Timeout, Cancel
Starvation CPU, Memory, Network, or Disk at maximum capacity
Position Beginning, Middle, End (Edit at the beginning of the line, middle of the line, end of the line)
Selection Some, None, All (Some permissions, No permissions, All permissions)
Count 0, 1, Many (0 transactions, 1 transactions, Many simultaneous transactions)
Multi-User Simultaneous create, update, delete from two accounts or same account logged in twice.
Flood Multiple simultaneous transactions or requests flooding the queue.
Dependencies Identify “has a” relationships (a Customer has an Invoice; an Invoice has multiple Line Items).
Apply CRUD, Count, Position, and/or Selection heuristics (Customer has 0, 1, many Invoices;
Invoice has 0, 1, many Line Items; Delete last Line Item then Read; Update first Line Item; Some,
None, All Line Items are taxable; Delete Customer with 0, 1, Many Invoices)
Constraints Violate constraints (leave required fields blank, enter invalid combinations in dependent fields,
enter duplicate IDs or names). Apply with the Input Method heuristic.
Input Method Typing, Copy/Paste, Import, Drag/Drop, Various Interfaces (GUI v. API)
Sequences Vary Order of Operations Undo/Redo Reverse Combine Invert Simultaneous
Sorting Alpha v. Numeric Across Multiple Pages
State Analysis Identify states and events/transitions, then represent them in a picture or table. Works with
the Sequences and Interruption heuristics.
Map Making Identify a “base” or “home” state. Pick a direction and take one step. Return to base. Repeat.
Users & Scenarios Use Cases, Soap Operas, Personae, Extreme Personalities
Frameworks
Judgment Inconsistencies, Absences, and Extras with respect to Internal, External – Specific, or External –
Cultural reference points. (James Lyndsay, Workroom Productions)
Observations Input/Output/Linkage (James Lyndsay, Workroom Productions)
Flow Input/Processing/Output
Requirements Users/Functions/Attributes/Constraints (Gause & Weinberg Exploring Requirements)
Nouns & Verbs The objects or data in the system and the ways in which the system manipulates it. Also,
Adjectives (attributes) such as Visible, Identical, Verbose and Adverbs (action descriptors) such
as Quickly, Slowly, Repeatedly, Precisely, Randomly. Good for creating random scenarios.
Deming’s Cycle Plan, Do, Check, Act
This cheat sheet includes ideas from Elisabeth Hendrickson, James Lyndsay, and Dale Emery
www.qualitytree.com
Copyright © 2006 Quality Tree Software, Inc.