✅ 1. Equivalence Partitioning (EP)
What it is:
Divides input data into partitions of equivalent data from which test cases can
be derived. The idea is that if one value in a partition works, all others will
too.
Example:
If a form accepts ages from 18 to 60:
- Valid
partitions: 18–60
- Invalid
partitions: <18 and >60
Test cases:
- One
value from each partition: 25 (valid), 17 (invalid), 61 (invalid)
When to use:
When input data can be grouped into ranges or categories.
✅ 2. Boundary Value Analysis
(BVA)
What it is:
Focuses on values at the edges (boundaries) of input ranges, where defects are
most likely to occur.
Example:
For an input field that accepts values from 1 to 100:
- Test
boundaries: 0, 1, 2 and 99, 100, 101
Test cases:
- 0
(just below), 1 (lower boundary), 2 (just above)
- 99
(just below), 100 (upper boundary), 101 (just above)
When to use:
When input fields have defined minimum and maximum values.
What it is:
Uses a table to represent combinations of inputs and their corresponding
outputs. Great for testing business rules.
Example:
A login form:
- Rule:
Login succeeds only if both username and password are correct.
| Username | Password | Result |
|---|---|---|
| Valid | Valid | Success |
| Valid | Invalid | Failure |
| Invalid | Valid | Failure |
| Invalid | Invalid | Failure |
When to use:
When the system behavior depends on multiple conditions or rules.
✅ 4. State Transition Testing
What it is:
Tests how the system behaves when transitioning from one state to another based
on inputs/events.
Example:
ATM machine states:
- Insert
card → Enter PIN → Select transaction → Eject card
Test cases:
- Valid
transitions (e.g., correct PIN → access granted)
- Invalid
transitions (e.g., enter PIN without card)
When to use:
When the system has defined states and transitions (e.g., workflows, UI
navigation).
✅ 5. Error Guessing
What it is:
Relies on tester experience to guess where defects are likely to occur.
Example:
- Entering
special characters in a name field
- Submitting
a form without required fields
When to use:
When you have domain knowledge or past experience with similar systems.
✅ 6. Pairwise Testing (All-Pairs
Testing)
What it is:
Tests all possible discrete combinations of input pairs to reduce the number of
test cases while maximizing coverage.
Example:
If you have 3 fields with 3 values each, instead of testing all 27
combinations, pairwise testing might reduce it to 9–10 combinations.
When to use:
When testing combinations of multiple input parameters.
🧠 Summary Table
| Technique | Best For | Example Scenario |
|---|---|---|
| Equivalence Partitioning | Grouped input ranges | Age input: 18–60 |
| Boundary Value Analysis | Edge cases | Salary input: 0–100,000 |
| Decision Table Testing | Business rules | Loan approval logic |
| State Transition | Workflow or UI state changes | ATM or login flow |
| Error Guessing | Common user errors | Leaving fields blank, invalid formats |
| Pairwise Testing | Input combinations | Form with multiple dropdowns |
🧪 What Is Pairwise
Testing?
Pairwise testing ensures that every possible pair of
input values is tested at least once. It’s especially useful when testing
systems with multiple input parameters, where testing all combinations
would be too time-consuming.
✅ Real-World Example: Car
Ordering Application
Let’s say you’re testing a car ordering system with
the following input parameters:
| Parameter | Values |
|---|---|
| Order Category | Buy, Sell |
| Location | Delhi, Mumbai |
| Car Brand | BMW, Audi, Mercedes |
| Registration Type | Valid, Invalid |
| Order Type | E-Booking, In-Store |
| Order Time | Working Hours, Non-Working Hours |
🔢 Total Combinations
(Exhaustive Testing):
If you test all combinations:
2 × 2 × 3 × 2 × 2 × 2 = 96 test cases
That’s a lot!
✅ Pairwise Testing Approach
With pairwise testing, you only test combinations
that cover every possible pair of values at least once. This drastically
reduces the number of test cases while still catching most defects caused by
variable interactions.
🔁 Sample Pairwise Test
Cases (Reduced Set):
| Test Case | Order Category | Location | Car Brand | Registration | Order Type | Order Time |
|---|---|---|---|---|---|---|
| TC01 | Buy | Delhi | BMW | Valid | E-Booking | Working Hours |
| TC02 | Sell | Mumbai | Audi | Invalid | In-Store | Non-Working Hours |
| TC03 | Buy | Mumbai | Mercedes | Valid | In-Store | Working Hours |
| TC04 | Sell | Delhi | BMW | Invalid | E-Booking | Non-Working Hours |
| TC05 | Buy | Delhi | Audi | Valid | In-Store | Non-Working Hours |
| TC06 | Sell | Mumbai | Mercedes | Invalid | E-Booking | Working Hours |
👉 These 6 test cases
cover all possible pairs of input values, reducing the original 96 down
to just a handful.
🎯 When to Use Pairwise
Testing
- When
you have many input parameters with multiple values
- When full
combinatorial testing is impractical
- When
you want maximum coverage with minimal effort
Comments
Post a Comment