Learning Outcome
3
Design test cases using ECP
2
Identify valid and invalid equivalence classes
1
Understand Equivalence Class Partitioning
Recall
Black box testing focuses on input and output
Equivalence Class Partitioning is one black box technique
In previous topic, we studied Black Box Testing
Why Black Box Techniques?
Source code knowledge is not required
Used during system and acceptance testing
Focuses on user requirements
Easy to apply in manual testing
Introduction to ECP
It divides input data into groups
Equivalence Class Partitioning is a Black Box Testing technique
Each group is treated as equivalent
Output
Input
Valid Equivalence class
Types of Equivalence Classes
Invalid Equivalence class
An equivalence class is a set of input values
One test case represents the entire class
System behaves the same for all values in the class
What is
Equivalence Class?
Valid Equivalence Class
Contains correct and acceptable input values
System should accept these values
Produces expected output
Invalid Equivalence Class
Contains incorrect or unacceptable input values
System should reject these values
Error message should be displayed
Steps to Apply ECP
Identify Conditions
Create Partitions
Define Test Cases
Identify Functions
Execute & Analyze
Run tests and evaluate results
Create one test per partition
Divide into valid and invalid classes
Define all input parameters and constraints
Determine which features need testing
1
2
3
4
4
4
5
Example
Condition:
Age must be between 18 and 60
Less than 18
18 to 60
Greater than 60
Valid Class
Invalid Class
Invalid Class
Test Case 1
Test Case 2
Test Case 3
Test Case Design Using ECP
Age = 15 → Rejected
Age = 65 → Rejected
Age = 25 → Accepted
Risks Without Equivalence Partitioning
1. Time Waste
2-5x longer test execution times
2. Higher Costs
Increased maintenance for bloated test suites
3. Missed Defects
Critical boundary issues often overlooked
4. Resource Drain
Thousands of redundant test cases
Advantages and Limitations of ECP
Not suitable for complex logic
Advantages
Limitations
Summary
3
Ensures good coverage with fewer test cases
2
Helps in efficient manual testing
1
ECP is an important black box testing technique
Quiz
The main purpose of Equivalence Class Partitioning is to:
A. Increase number of test cases
B. Reduce test execution time
C. Reduce number of test cases
D. Test internal code
Quiz
The main purpose of Equivalence Class Partitioning is to:
A. Increase number of test cases
B. Reduce test execution time
C. Reduce number of test cases
D. Test internal code