You are on page 1of 12

Software Testing Notes:

https://www.javatpoint.com/equivalence-partitioning-technique-in-black-box-testing

Equivalence Partitioning Technique


Equivalence partitioning is a technique of software testing in which input data is divided
into partitions of valid and invalid values, and it is mandatory that all partitions must
exhibit the same behavior. If a condition of one partition is true, then the condition of
another equal partition must also be true, and if a condition of one partition is false,
then the condition of another equal partition must also be false. The principle of
equivalence partitioning is, test cases should be designed to cover each partition at
least once. Each value of every equal partition must exhibit the same behavior as other.

The equivalence partitions are derived from requirements and specifications of the
software. The advantage of this approach is, it helps to reduce the time of testing due
to a smaller number of test cases from infinite to finite. It is applicable at all levels of
the testing process.

Examples of Equivalence Partitioning technique


Assume that there is a function of a software application that accepts a particular
number of digits, not greater and less than that particular number. For example, an
OTP number which contains only six digits, less or more than six digits will not be
accepted, and the application will redirect the user to the error page

1.  OTP Number = 6 digits  
Examples of Equivalence Partitioning technique
A function of the software application accepts a 10 digit mobile number.

2 . Mobile number = 10 digits   
Following are pros and cons of equivalence partitioning technique:

Advantages disadvantages

It is process-oriented All necessary inputs may not cover.

We can achieve the Minimum test coverage This technique will not consider the cond

It helps to decrease the general test execution time The test engineer might assume that th
and also reduce the set of test data. which leads to the problem during the te

How we perform equivalence partitioning


We can perform equivalence partitioning in two ways which are as follows:
Boundary Value Analysis and Equivalence
Partitioning Testing
https://www.guru99.com/equivalence-partitioning-boundary-value-analysis.html

Practically, due to time and budget considerations, it is not possible to perform


exhausting testing for each set of test data, especially when there is a large pool of
input combinations.

 We need an easy way or special techniques that can select test cases
intelligently from the pool of test-case, such that all test scenarios are covered.
 We use two techniques - Equivalence Partitioning & Boundary Value
Analysis testing techniques to achieve this.

What is Boundary Testing?


Boundary testing is the process of testing between extreme ends or boundaries
between partitions of the input values.

 So these extreme ends like Start- End, Lower- Upper, Maximum-Minimum,


Just Inside-Just Outside values are called boundary values and the testing is
called "boundary testing".
 The basic idea in normal boundary value testing is to select input variable
values at their:

1. Minimum
2. Just above the minimum
3. A nominal value
4. Just below the maximum
5. Maximum

Equivalence Partitioning
Equivalence Partitioning or Equivalence Class Partitioning is type of black box
testing technique which can be applied to all levels of software testing like unit,
integration, system, etc. In this technique, input data units are divided into equivalent
partitions that can be used to derive test cases which reduces time required for testing
because of small number of test cases.

 It divides the input data of software into different equivalence data classes.
 You can apply this technique, where there is a range in the input field.

Equivalence Partitioning
Equivalence Partitioning or Equivalence Class Partitioning is type of black box testing
technique which can be applied to all levels of software testing like unit, integration, system, etc.
In this technique, input data units are divided into equivalent partitions that can be used to derive
test cases which reduces time required for testing because of small number of test cases.

 It divides the input data of software into different equivalence data classes.
 You can apply this technique, where there is a range in the input field.
Example 1: Equivalence and Boundary Value
 Let's consider the behavior of Order Pizza Text Box Below
 Pizza values 1 to 10 is considered valid. A success message is shown.
 While value 11 to 99 are considered invalid for order and an error message will appear, "Only 10
Pizza can be ordered"

Submit
Order Pizza:      

Here is the test condition

1. Any Number greater than 10 entered in the Order Pizza field(let say 11) is considered invalid.
2. Any Number less than 1 that is 0 or below, then it is considered invalid.
3. Numbers 1 to 10 are considered valid
4. Any 3 Digit Number say -100 is invalid.

We cannot test all the possible values because if done, the number of test cases will be more than
100. To address this problem, we use equivalence partitioning hypothesis where we divide the
possible values of tickets into groups or sets as shown below where the system behavior can be
considered the same.

The divided sets are called Equivalence Partitions or Equivalence Classes. Then we pick only
one value from each partition for testing. The hypothesis behind this technique is that if one
condition/value in a partition passes all others will also pass. Likewise, if one condition in a
partition fails, all other conditions in that partition will fail.
Boundary Value Analysis- in Boundary Value Analysis, you test boundaries between
equivalence partitions

In our earlier equivalence partitioning example, instead of checking one value for each partition,
you will check the values at the partitions like 0, 1, 10, 11 and so on. As you may observe, you
test values at both valid and invalid boundaries. Boundary Value Analysis is also called range
checking.

Equivalence partitioning and boundary value analysis(BVA) are closely related and can be used
together at all levels of testing.

 
Why Equivalence & Boundary Analysis Testing
1. This testing is used to reduce a very large number of test cases to manageable chunks.
2. Very clear guidelines on determining test cases without compromising on the effectiveness of
testing.
3. Appropriate for calculation-intensive applications with a large number of variables/inputs

Summary:

 Boundary Analysis testing is used when practically it is impossible to test a large pool of test
cases individually
 Two techniques - Boundary value analysis and equivalence partitioning testing techniques are
used
 In Equivalence Partitioning, first, you divide a set of test condition into a partition that can be
considered.
 In Boundary Value Analysis you then test boundaries between equivalence partitions

Appropriate for calculation-intensive applications with variables that represent


physical quantities
What is Decision Table Testing?
https://www.guru99.com/decision-table-testing.html

Decision table testing is a software testing technique used to test system behavior for
different input combinations. This is a systematic approach where the different input
combinations and their corresponding system behavior (Output) are captured in a
tabular form. That is why it is also called as a Cause-Effect table where Cause and
effects are captured for better test coverage.

Example 1: How to make Decision Base Table for Login


Screen
Let's create a decision table for a login screen.

Example 2: How to make Decision Table for Upload


Screen
Now consider a dialogue box which will ask the user to upload photo with certain
conditions like –

1. You can upload only '.jpg' format image


2. file size less than 32kb
3. resolution 137*177.

If any of the conditions fails the system will throw corresponding error message
stating the issue and if all conditions are met photo will be updated successfully

Let's create the decision table for this case.

For this condition, we can create 8 different test cases and ensure complete coverage
based on the above table.

1. Upload a photo with format '.jpg', size less than 32kb and resolution 137*177
and click on upload. Expected result is Photo should upload successfully
2. Upload a photo with format '.jpg', size less than 32kb and resolution not
137*177 and click on upload. Expected result is Error message resolution
mismatch should be displayed
3. Upload a photo with format '.jpg', size more than 32kb and resolution 137*177
and click on upload. Expected result is Error message size mismatch should be
displayed
4. Upload a photo with format '.jpg', size more than equal to 32kb and resolution
not 137*177 and click on upload. Expected result is Error message size and
resolution mismatch should be displayed
5. Upload a photo with format other than '.jpg', size less than 32kb and resolution
137*177 and click on upload. Expected result is Error message for format
mismatch should be displayed
6. Upload a photo with format other than '.jpg', size less than 32kb and resolution
not 137*177 and click on upload. Expected result is Error message format and
resolution mismatch should be displayed
7. Upload a photo with format other than '.jpg', size more than 32kb and
resolution 137*177 and click on upload. Expected result is Error message for
format and size mismatch should be displayed
8. Upload a photo with format other than '.jpg', size more than 32kb and
resolution not 137*177 and click on upload. Expected result is Error message
for format, size and resolution mismatch should be displayed
9. Failure Modes and Effects Analysis
http://www.ihi.org/resources/Pages/Tools/FailureModesandEffectsAnalysisTool.a
spx#:~:text=Failure%20Modes%20and%20Effects%20Analysis%20(FMEA)
%20is%20a%20systematic%2C,most%20in%20need%20of%20change.

Failure Modes and Effects Analysis (FMEA) is a systematic, proactive method for evaluating a
process to identify where and how it might fail and to assess the relative impact of different
failures, in order to identify the parts of the process that are most in need of change.

Failure Modes and Effects Analysis (FMEA) is a systematic, proactive method for evaluating a process to identify
where and how it might fail and to assess the relative impact of different failures, in order to identify the parts of the
process that are most in need of change. FMEA includes review of the following:

 Steps in the process

 Failure modes (What could go wrong?)

 Failure causes (Why would the failure happen?)

 Failure effects (What would be the consequences of each failure?)

Teams use FMEA to evaluate processes for possible failures and to prevent them by correcting the processes
proactively rather than reacting to adverse events after failures have occurred. This emphasis on prevention may
reduce risk of harm to both patients and staff. FMEA is particularly useful in evaluating a new process prior to
implementation and in assessing the impact of a proposed change to an existing process.

You might also like