Non-FictionSelf-HelpTesting

Test Automation Creativity eBook

Design clever test scenarios that catch edge cases

by Pannell Sherita

  • English
  • 146 pages
  • 2026
  • SamEnrico

Design clever test scenarios that catch edge cases and failures.

Formats

Free sample

Chapter 1: The Curiosity Engine...–- Every test script begins with a hypothesis. Most testers, however, have forgotten how to question it.You have just run your automated test suite. Five thousand tests passed. The dashboard is green. The build pipeline happily moves to production.

Everyone celebrates. Three hours later, a customer discovers that entering a discount code containing the letter "O" instead of the digit "0" crashes the checkout service. Not an error message. A full, unrecoverable crash.The test suite did not catch this. Why?

Because no one thought to look for it. The automation did exactly what it was told: compare actual outputs to expected outputs. And those expected outputs were written by people who never imagined a discount code with a letter where a digit should go.This is not a failure of automation. This is a failure of imagination. And imagination, contrary to popular belief, is not a personality trait you are born with.

It is a skill. A muscle. And like any muscle, it can be trained, strengthened, and systematically applied.This book is about building that muscle. But before we dive into heuristics, test doubles, property-based testing, or any of the other techniques that fill the remaining chapters, we must start with something more fundamental. We must start with mindset.The Verification Trap Let us name the enemy.

Most software testing—and most test automation in particular—operates from what I call the Verification Mindset. The Verification Mindset asks a single question: Does the actual behavior match the expected behavior?This seems perfectly reasonable. After all, testing is about finding discrepancies, is it not? The problem is not the question itself. The problem is that the Verification Mindset stops there.

It assumes that the expected behavior is correct, complete, and sufficient. It assumes that the person writing the test already knows everything worth knowing about how the system should behave. It assumes that the only interesting failures are the ones you already anticipated.Here is the uncomfortable truth: the most expensive bugs in production history were not failures of verification. They were failures of imagination. No one at NASA wrote a test that said, "Verify that the orbiter does not crash because of a metric-imperial conversion error." No one at Knight Capital wrote a test that said, "Verify that deploying old code does not send millions of erroneous orders into the market." No one at Therac-25 wrote a test that said, "Verify that a race condition in the operator interface does not deliver lethal radiation doses."These bugs were not verification failures.

They were imagination failures. The expected behavior, as written down in test cases, did not include these scenarios because no one conceived of them.The Verification Mindset is safe. It is comfortable. It gives you a green dashboard and a warm feeling of progress. But it is also a trap.

It rewards the illusion of coverage while leaving the most dangerous territories completely unexplored.The Exploration Mindset Now consider an alternative. The Exploration Mindset asks a different set of questions:What else could happen here?What assumptions am I making that might be wrong?What happens if the world does not behave the way I expect?Where is the system most vulnerable to surprise?Notice what has changed. The Verification Mindset is about confirming. The Exploration Mindset is about discovering. The Verification Mindset looks backward at requirements.

The Exploration Mindset looks forward into possibility space. The Verification Mindset asks, "Does it work?" The Exploration Mindset asks, "How might it break?"This distinction is not merely philosophical. It has concrete, measurable consequences for how you design automated tests.A tester operating from the Verification Mindset writes:gherkin Copy Download Given a user with a valid credit card When the user purchases a $10 item Then the order status should be "confirmed"A tester operating from the Exploration Mindset writes:gherkin Copy Download Given a user with a valid credit card that expires tomorrow And the purchase is made at 11:59 PM on the last day of the month When the user purchases a $10 item Then what happens to the order status? And what happens to the authorization hold? And what does the user see?The first tester is verifying.

The second tester is exploring. The first tester will catch bugs that have been seen before. The second tester will catch bugs that no one has thought of yet.Throughout this book, we will return to the Exploration Mindset again and again. Chapter 4 will give you a systematic heuristics playbook for asking "what if" questions about time, state, data, limits, and external dependencies. Chapter 11 will show you how the Three Amigos meeting uses the Exploration Mindset collaboratively.

But in this chapter, we focus on building the mindset itself as a daily habit, independent of any specific technique.The Three Core Mental Models The Exploration Mindset can be broken down into three overlapping mental models. Think of these as lenses. You can look at any system, any feature, any line of code through each lens, and each will reveal different kinds of questions.Mental Model 1: Curiosity as a Skill Most people think curiosity is a personality trait. You either have it or you do not. This is false.

Curiosity is a practice. It is a set of behaviors that can be learned, rehearsed, and applied systematically.The Five Whys of Curiosity When you encounter a statement of fact about the system—whether in documentation, code, or conversation—train yourself to ask "why" five times.Statement: "The system only accepts credit cards with valid expiration dates."Why? "Because expired cards should not be processed."Why? "Because payment gateways reject them."Why? "Because the gateway checks the expiration date against current time."Why?

"Because that is how the payment industry prevents fraud."Why? "Because..."By the fifth why, you have usually arrived at an assumption that someone made. And assumptions are where bugs hide.The Inversion Habit For every positive statement about the system, train yourself to invert it."The system accepts valid credit cards" → "What happens with invalid cards?""Users can add items to their cart" → "What happens when the cart is empty?""The API returns a 200 OK for successful requests" → "What does it return for failed requests? What does a failed request even look like?"Inversion is uncomfortable. It feels like being contrary.

But the most valuable testers are not the ones who agree with everyone. They are the ones who ask the uncomfortable questions that everyone else was avoiding.The Hypothesis Journal Keep a digital or physical journal of test hypotheses. Each entry follows a simple template:Observation: "The login endpoint accepts email and password."Assumption: "The email must be in valid format and the password must be non-empty."Hypothesis: "If I send a password with 10,000 characters, the system will either truncate it, reject it, or crash."Experiment: Run the automated test.Result: Document what actually happens.Over time, this journal trains your brain to see assumptions automatically. You will start generating hypotheses without conscious effort.Mental Model 2: The "What If" Machine The second mental model is a systematic way to explore how components interact. Software systems are not just collections of features.

They are networks of dependencies, state transitions, and timing relationships. The most interesting bugs live in the seams between components…

This is the end of the free sample. Get the eBook to keep going. Buy now

About this book

Design clever test scenarios that catch edge cases and failures.

Details

Author
Pannell Sherita
Publisher
SamEnrico
Language
English
Genre
Non-Fiction, Self-Help, Testing
Released
2026-06-10
Pages (approx.)
146
Available as
eBook, Audiobook

Read better in the ZLOADR app

Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.

More by Pannell Sherita

See all

You may also like

See all