A Report
on
Equivalence Class Testing
Submitted in partial fulfillment of
the requirement for the award of
the degree of
B.Tech in Artificial Intelligence and Data Science
Under The Supervision of
Dr. Neeraj Arya
Professor
Submitted By:
Sachin Chaudhary - 20scse1280021
Akhilendra Kumar - 20scse1280014
Amir Sohail – 20scse1280004
SCHOOL OF COMPUTING SCIENCE AND ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE AND
ENGINEERING GALGOTIAS UNIVERSITY, GREATER NOIDA
INDIA
DECEMBER, 2022
ABSTRACT
The use of equivalence classes as the basis for functional testing has two motivations: we
would like to have a sense of complete testing; and, at the same time, we would hope to
avoid redundancy. Neither of these hopes is realized by boundary value testing: looking at
the tables of test cases, it is easy to see massive redundancy — and looking more closely,
serious gaps exist. Equivalence class testing echoes the two deciding factors of boundary
value testing, robustness, and the single/multiple fault assumption. Three forms of
equivalence class testing were identified in the first edition of this book; here, we identify
four. The single versus multiple fault assumption yields the weak/strong distinction made
in the first edition. The focus on invalid data yields a new distinction: robust versus
normal.
Equivalence class testing (Equivalence class Partitioning) is a black-box testing technique
used in software testing as a major step in the Software development life cycle (SDLC).
This testing technique is better than many of the testing techniques like boundary value
analysis, worst case testing, robust case testing and many more in terms of time
consumption and terms of precision of the test cases. Since testing is done to identify
possible risks, equivalence class testing performs better than the other techniques as the
test cases generated using it are logically identified with partitions in between to create
different input and output classes
INTRODUCTION
Equivalence Class Testing is an important software testing technique, used by the testers
for grouping and partitioning the test input data, that is further used for the purpose of
testing the software product, into a number of different classes. Equivalence Class Testing,
which is also known as Equivalence Class Partitioning (ECP) and Equivalence
Partitioning, is an important software testing technique used by the team of testers for
grouping and partitioning of the test input data, which is then used for the purpose of
testing the software product into a number of different classes.
These different classes resemble the specified requirements and common behaviour or
attribute(s) of the aggregated inputs. Thereafter, the test cases are designed and created
based on each class attribute(s) and one element or input is used from each class for the
test execution to validate the software functioning, and simultaneously validates the similar
working of the software product for all the other inputs present in their respective classes.
Moreover, equivalence class testing can be termed as a logical step in the model of
functional testing. It improves the quality of test cases, which further enhances the quality
of testing, by removing the vast amount of redundancy and gaps that appear in the
boundary value testing.
IMPORTANT FEATURES
Equivalence class testing can be termed as a logical step in the model of functional testing.
It improves the quality of test cases, which further enhances the quality of testing, by
removing the vast amount of redundancy and gaps that appear in the boundary value
testing. Other features of this testing technique are:
It is a black box testing technique which restricts the testers to examine the software
product, externally.
Also known by the name of equivalence class partitioning, it is used to form groups
of test inputs of similar behaviour or nature.
Based on the approach, if one member works well in the family then the whole
family is considered to function well and if one members fails, whole family is
rejected.
Test cases are based on classes, not on every input, thereby reduces the time and
efforts required to build large number of test cases.
It may be used at any level of testing i.e. unit, integration, system & acceptance.
It is good to go for the ECT, when the input data is available in terms of intervals
and sets of discrete values.
However, there is no such specific rule to use only input from each class. Based on
the experience and need, a tester may opt for more than one input.
It may results into good amount of decrease in the redundant test cases, if
implemented properly.
It may not work well with the Boolean or logical types variables.
A mixed combination of Equivalence class testing and boundary value
testing produces effective results.
The fundamental concept of equivalence class testing/partition comes from
the equivalence class, which further comes from equivalence relations.
Types of Equivalence Class Testing
The equivalence class testing can be categorized into four different types, which are
integral part of testing and cater to different data set.
Weak Normal Equivalence Class Testing:- In this first type of equivalence class
testing, one variable from each equivalence class is tested by the team. Moreover,
the values are identified in a systematic manner. Weak normal equivalence class
testing is also known as single fault assumption.
Strong Normal Equivalence Class Testing:-Termed as multiple fault assumption, in
strong normal equivalence class testing the team selects test cases from each element
of the Cartesian product of the equivalence. This ensures the notion of completeness
in testing, as it covers all equivalence classes and offers the team one of each
possible combinations of inputs.
Weak Robust Equivalence Class Testing:-Like weak normal equivalence, weak
robust testing too tests one variable from each equivalence class. However, unlike
the former method, it is also focused on testing test cases for invalid values.
Strong Robust Equivalence Class Testing:- Another type of equivalence class
testing, strong robust testing produces test cases for all valid and invalid elements of
the product of the equivalence class. However, it is incapable of reducing the
redundancy in testing.
Advantages
Helps reduce the number of test cases, without compromising the test coverage.
Reduces the overall test execution time as it minimizes the set of test data.
Enables the testers to focus on smaller data sets, which increases the probability of
uncovering more defects in the software product.
Used in cases where performing exhaustive testing is difficult.
Disadvantages
It does not consider the conditions for boundary value.
The identification of equivalence classes relies heavily on the expertise of testers.
Testers might assume that the output for all input data set is correct, which can
become a
great hurdle in testing.
Guidelines For ECP
Use robust forms if the error conditions in the software product are of high priority.
It can be used by the team in projects where the program function is complex.
To ensure the accuracy and precision of equivalence class testing, define the input
data in terms of intervals and sets of discrete values.
The team needs to select one valid and one invalid input value each, if the input
conditions are broken or not stated accurately.
Establishing a proper equivalence relation might require several tries and extra
efforts of the team.
Example
Consider an example of an application that accepts a numeric number as input with a value
between 10 to 100 and finds its square. Now, using equivalence class testing, we can create
the following equivalence classes-
Equivalence Class Explanation
Numbers 10 to 100 This class will include test data for a positive scenario.
This class will include test data that is restricted by the
Numbers 0 to 9 application. Since it is designed to work with numbers 10 to 100
only.
This class will again include test data that is restricted by the
Greater than 100 application but this time to test the upper limit.
Since negative numbers can be treated in a different way so, we
Negative numbers will create a different class for negative numbers in order to
check the robustness of the application.
This class will be used to test the robustness of the application
Alphabets with non-numeric characters.
Just like the equivalence class for alphabets, we can have a
Special characters separate equivalence class for special characters.
Identification of Equivalence Classes
Let’s discuss some points or best practices regarding the identification of Equivalence
classes-
Cover all test data types for positive and negative test scenarios. We have to create
test data classes in such a way that covers all sets of test scenarios but at the same
time, there should not be any kind of redundancy.
If there is a possibility that the test data in a particular class can be treated differently
then it is better to split that equivalence class.
For example, in the above example, the application doesn’t work with numbers –
less than 10. So, instead of creating 1 class for numbers less than 10, we created two
classes – numbers 0-9 and negative numbers. This is because there is a possibility
that the application may handle negative numbers differently.
Conclusion
A type of specification based testing or black box testing technique, Equivalence
Partitioning or Equivalence Class Testing is a widely used method that decreases the
number of possible test cases that are required to a software product. Moreover, its ability
to generate greater testing coverage, without compromising time and efforts, makes
Equivalence Class Testing a popular testing technique worldwide.
References
https://www.encora.com/insights/natural-language-processing-and-machine-learning
https://monkeylearn.com/blog/natural-language-processing-techniques/
https://www.future-processing.com/blog/the-future-of-natural-language-processing/
https://www.itbusinessedge.com/development/the-future-of-natural-language-
processing-is-bright/
https://www.geeksforgeeks.org/equivalence-class-testing-next-date-problem/
https://www.professionalqa.com/equivalence-class-testing
https://www.youtube.com/results?search_query=equivalence+class+testing+