This is a guest post by Kanif Fattepurkar, founder of Software Testing Class. More on him later, let’s see what has to say about Boundary value analysis and Equivalence partitioning first! 

Click Here To Download Your Practical Test Case Template Now (it’s free)

In this article we will discuss some basic test design techniques used to create better test cases, particularly Boundary value analysis and Equivalence partitioning and how these are used in actual testing.

Following a brief explanation, it will become easy for you to understand how test cases are designed based upon these techniques.

Equivalence partitioning:

Dividing the test input data into a range of values and selecting one input value from each range is called Equivalence Partitioning. This is a black box test design technique used to calculate the effectiveness of test cases and which can be applied to all levels of testing from unit, integration, system testing and so forth.

We cannot test all the possible input domain values, because if we attempted this, the number of test cases would be too large. In this method, input data is divided into different classes, each class representing the input criteria from the equivalence class. We then select one input from each class.

This technique is used to reduce an infinite number of test cases to a finite number, while ensuring that the selected test cases are still effective test cases which will cover all possible scenarios.

Let’s take a very basic and simple example to understand the Equivalence partitioning concept:

If one application is accepting input range from 1 to 100, using equivalence class we can divide inputs into the classes, for example, one for valid input and another for invalid input and design one test case from each class.

In this example test cases are chosen as below:

  • One is for valid input class i.e. selects any value from input between ranges 1 to 100. So here we are not writing hundreds of test cases for each value. Any one value from this equivalence class should give you the same result.
  • One is for invalid data below lower limit i.e. any one value below 1.
  • One is for invalid data above upper limit i.e. any value above 100.

Click Here To Download Your Practical Test Case Template Now (it’s free)

Boundary value analysis:

For the most part, errors are observed in the extreme ends of the input values, so these extreme values like start/end or lower/upper values are called Boundary values and analysis of these Boundary values is called “Boundary value analysis”. It is also sometimes known as ‘range checking’.

Boundary value analysis is another black box test design technique and it is used to find the errors at boundaries of input domain rather than finding those errors in the center of input.

Equivalence Partitioning and Boundary value analysis are linked to each other and can be used together at all levels of testing. Based on the edges of the equivalence classes, test cases can then be derived.

Each boundary has a valid boundary value and an invalid boundary value. Test cases are designed based on the both valid and invalid boundary values. Typically, we choose one test case from each boundary.

Finding defects using Boundary value analysis test design technique is very effective and it can be used at all test levels. You can select multiple test cases from valid and invalid input domains based on your needs or previous experience but remember you do have to select at least one test case from each input domain.

Let’s take same above example to understand the Boundary value analysis concept:

  • One test case for exact boundary values of input domains each means 1 and 100.
  • One test case for just below boundary value of input domains each means 0 and 99.
  • One test case for just above boundary values of input domains each means 2 and 101.

Click Here To Download Your Practical Test Case Template Now (it’s free)

About the author

Kanif Fattepurkar is the founder of Software Testing Class blog, currently living in Pune, India. He is currently working as Sr. Software QA Engineer and has over 6 years of experience. He’s always happy to share his passion for Software Testing related articles over in his own blog at Software Testing Class

 

Author Ulf Eriksson

Ulf is the founder of ReQtest and as the Product Owner, decides what features are added to the product, and makes sure that ReQtest is of a consistently high quality. Ulf has written several books and courses as well as a library of articles on the subjects of testing and requirements management, as well as speaking publicly on a number of subjects related to the world of testing.

More posts by Ulf Eriksson

Join the discussion 6 Comments

  • jon hagar says:

    So these are the basic classic definitions, but as Cem Kaner etal point out in “the domain testing workbook”, which is great, many testers know the definition but don’t apply these well or even see how they can be applied. Testers should reference this workbook.

  • FMI says:

    Hey there I am so grateful I found your site, I really found you by mistake, while I was looking on Yahoo for something else, Regardless I am
    here now and would just like to say thanks for a fantastic post
    and a all round interesting blog (I also love the theme/design),
    I don’t have time to browse it all at the moment but I have bookmarked it and also added your RSS feeds, so
    when I have time I will be back to read a lot more, Please do keep up the superb work.

  • These are great posts. Nice work!

  • Hello, it’s a clear and precise explanation of the ECP and the BV techniques. And the examples cited in this post clarify the concept further to the ease of the reader.

    Thanks,
    Meenakshi

  • Ethi says:

    Superb.. I like this post Thank you very much Ulf for the post

Leave a Reply