โ† Main Menu
1
Anatomy of a Test Case
2
Boundary Value Analysis
3
Equivalence Partitioning
4
Decision Tables
5
State Transition
๐Ÿ“„
Templates
1
Anatomy of a Good Test Case
What separates a professional test case from a useless one.
The Golden Rule
A good test case is atomic (one condition per case), reproducible (any tester can run it), clear (no ambiguity), and traceable (linked to a requirement). If another tester can't run your test case without asking questions โ€” it's not done.
Test Case ID REQUIRED
TC-LOGIN-001 โ€” Unique identifier for tracking and referencing.
Title REQUIRED
Verify login with valid credentials โ€” Short, descriptive action.
Preconditions REQUIRED
User account exists. App is running. Browser is open.
Test Steps REQUIRED
Numbered, specific actions: 1. Open /login 2. Enter email 3. Enter password 4. Click Login
Test Data REQUIRED
Email: user@example.com / Password: Test1234! โ€” exact values, no vagueness.
Expected Result REQUIRED
User is redirected to /dashboard. Welcome message displayed.
Actual Result ON EXECUTION
Filled during test execution โ€” what actually happened.
Priority RECOMMENDED
High / Medium / Low โ€” helps prioritize execution order.

Real Example โ€” Login Feature

IDTitlePreconditionsStepsDataExpected ResultType
TC-LOGIN-001 Login with valid credentials Account exists 1.Open /login 2.Enter email 3.Enter pass 4.Click Login user@example.com / Test1234! โ†’ /dashboard โœ… Positive
TC-LOGIN-002 Login with wrong password Account exists 1.Open /login 2.Enter email 3.Enter wrong pass 4.Click Login user@example.com / WrongPass! Error: "Invalid credentials" โŒ Negative
TC-LOGIN-003 Login with empty fields App is running 1.Open /login 2.Leave fields empty 3.Click Login โ€” (empty) Required field errors shown โŒ Edge
TC-LOGIN-004 Login with SQL injection App is running 1.Open /login 2.Enter injection string 3.Click Login ' OR 1=1 -- Access denied โ€” no bypass โŒ Security
๐Ÿ’ก Key insight
Notice TC-LOGIN-004 โ€” security testing belongs in test cases too. SQL injection is one of the most common vulnerabilities. If you're not testing it, someone else will โ€” from the outside.
โœ๏ธ Exercise โ€” Write Your Own Test Case
Complete the test case for the scenario below. Fill in every field.
Scenario: An e-commerce checkout form has a promo code field. Users can enter a discount code before completing their purchase. Write a negative test case for an invalid promo code.
๐Ÿ” Quick Check
Test your understanding of test case anatomy
2
Boundary Value Analysis
Test at the edges โ€” that's where the bugs live.
Definition
BVA tests values at and just outside the boundaries of valid ranges. If a field accepts 1โ€“100, you must test: 0 (just below min), 1 (min), 100 (max), 101 (just above max). Four values. Full boundary coverage.
Visual: Age field accepts 18โ€“65
INVALID
< 18
VALID RANGE
18 โ€” 65
INVALID
> 65
17
Just below โŒ
18
Min valid โœ…
41
Midpoint (skip)
65
Max valid โœ…
66
Just above โŒ

Real Example โ€” E-Commerce: Quantity Field (1โ€“99)

IDInput ValueBoundary TypeExpected ResultStatus
TC-QTY-0010Just below minError: "Minimum quantity is 1"โŒ Fail
TC-QTY-0021Minimum validAccepted โ€” item added to cartโœ… Pass
TC-QTY-00399Maximum validAccepted โ€” 99 items in cartโœ… Pass
TC-QTY-004100Just above maxError: "Maximum quantity is 99"โŒ Fail
TC-QTY-005-1Negative valueError: "Invalid quantity"โŒ Fail
๐Ÿ’ก Why boundaries break systems
Developers often write if (qty > 0 && qty < 100) instead of qty <= 99. The difference: 99 passes the first check but 100 also passes. Off-by-one errors at boundaries are among the most common bugs in production.
โœ๏ธ Exercise โ€” Apply BVA
Generate the correct boundary test values for the scenario below.
Scenario: A contact form has a "Message" text field that accepts between 10 and 500 characters. Using Boundary Value Analysis, what are the 4 values you MUST test?
๐Ÿ” Quick Check
BVA in action
3
Equivalence Partitioning
Test smart โ€” one value per partition covers the whole group.
Definition
EP divides input data into partitions where the system should behave the same way. Test one representative value from each partition โ€” if it passes, the whole partition should pass. This dramatically reduces test cases without losing coverage.

Real Example โ€” Registration: Age Field

PartitionRangeRepresentative ValueExpected BehaviorValid?
Too young< 1815Error: "Must be 18 or older"Invalid โŒ
Valid adult18โ€“6430Registration proceedsValid โœ…
Senior65โ€“9970Registration proceedsValid โœ…
Too old> 99120Error: "Invalid age"Invalid โŒ
Non-numericText"abc"Error: "Numbers only"Invalid โŒ
Emptyโ€”(blank)Error: "Required field"Invalid โŒ
BVA + EP Together
These techniques complement each other. EP identifies the partitions. BVA tests the edges between them. Use both together for maximum coverage with minimum test cases.
โœ๏ธ Exercise โ€” Define Partitions
Identify the equivalence partitions for this scenario.
Scenario: A promo code field on a checkout form accepts alphanumeric codes of exactly 8 characters (e.g., "SUMMER24"). How many partitions would you define? Select all that apply.
๐Ÿ” Quick Check
Equivalence Partitioning
4
Decision Table Testing
When multiple conditions combine to determine outcomes.
Definition
Decision tables are used when system behavior depends on combinations of multiple conditions. Each column in the table is a rule โ€” a unique combination of conditions and its expected action. No combination goes untested.

Real Example โ€” E-Commerce: Free Shipping Logic

Rule: Free shipping if order > $50 OR user has Premium membership. Express shipping only for Premium members.

Condition / Rule Rule 1Rule 2Rule 3Rule 4
Order total > $50 YYNN
Premium member YNYN
โ†’ Free shipping โœ…โœ…โœ…โŒ
โ†’ Express available โœ…โŒโœ…โŒ
โ†’ Standard only โŒโŒโŒโœ…

4 rules โ†’ 4 test cases. Every combination covered.

๐Ÿ’ก When to use Decision Tables
Use decision tables when a feature has 2 or more conditions that combine to produce different outcomes. Login rules, discount logic, permission systems, form validation with multiple fields โ€” all perfect candidates. If you can write it as "if A and B then X, if A and not-B then Y" โ€” use a decision table.
๐Ÿ” Quick Check
Decision Table Testing
5
State Transition Testing
Test how a system moves between states โ€” and what happens at the boundaries.
Definition
State Transition tests the valid and invalid transitions between system states. A system is always in a state. Events trigger transitions. Testing ensures valid transitions work correctly โ€” and invalid ones are blocked.

Real Example โ€” User Account States

PENDING
Just registered
โ†’ verify email โ†’
ACTIVE
Verified
โ†’ 3 failed logins โ†’
LOCKED
Temporarily blocked
โ†’ admin unlock โ†’
ACTIVE
IDCurrent StateEvent / ActionExpected Next StateExpected Behavior
TC-ST-001PENDINGUser clicks verify linkACTIVEโœ… Account activated
TC-ST-002PENDINGLink expires (48h)EXPIREDโŒ Show re-send option
TC-ST-003ACTIVE3 failed login attemptsLOCKEDโŒ Show lockout message
TC-ST-004LOCKEDUser tries to loginLOCKEDโŒ Still blocked โ€” no bypass
TC-ST-005LOCKEDAdmin unlocks accountACTIVEโœ… User can login again
TC-ST-006PENDINGTry to login before verifyingPENDINGโŒ "Verify email first"
๐Ÿ’ก The invalid transition test
TC-ST-004 and TC-ST-006 test invalid transitions โ€” trying to do something from the wrong state. These are the most commonly missed tests. Developers test the happy path. QA tests what happens when someone tries to skip steps or move to invalid states.
๐Ÿ” Quick Check
State Transition Testing
๐Ÿ“„
Downloadable Templates
Professional templates ready to use in your next QA project.
๐Ÿ“‹
Standard Test Case Template
ID, Title, Preconditions, Steps, Data, Expected Result, Status, Priority
๐Ÿ”ข
BVA Test Case Template
Field, Min, Max, Just Below, Min Valid, Max Valid, Just Above
โšก
Decision Table Template
Conditions ร— Rules matrix with actions โ€” ready to fill
๐Ÿ”„
State Transition Template
Current State, Event, Next State, Expected Behavior, Valid/Invalid
๐Ÿ†
Testing Manual Maestro โ€” Complete!
You've mastered the 4 core test design techniques used by senior QA engineers worldwide.
"QAlemental, Dear Watson. Now you design tests like a detective โ€” systematic, thorough, and impossible to fool."
๐Ÿ  Home ๐ŸŽฎ Lesson ๐ŸŽฏ Exam ๐Ÿ’ป Programming ๐ŸŽฏ Manual ๐Ÿ“– Glossary