Boundary Value Analysis & Equivalence Partitioning with Examples

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.



In this tutorial, we will learn
  • What is Boundary Testing?
  • What is Equivalent Class Partitioning?
  • Example 1: Equivalence and Boundary Value
  • Example 2: Equivalence and Boundary Value
  • Why Equivalence & Boundary Analysis Testing

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 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
  6. In Boundary Testing, Equivalence Class Partitioning plays a good role
  7. Boundary Testing comes after the Equivalence Class Partitioning.
  8. What is Equivalent Class Partitioning?

    Equivalent Class Partitioning is a black box technique (code is not visible to tester) which can be applied to all levels of testing like unit, integration, system, etc. In this technique, you divide the set of test condition into a partition that can be considered the same.
    • It divides the input data of software into different equivalence data classes.
    • You can apply this technique, where there is a range in input field.

    Example : Equivalence and Boundary Value

  9. Suppose a password field accepts minimum 6 characters and maximum 10 characters
    That means results for values in partitions 0-5, 6-10, 11-14 should be equivalent
    Test Scenario #Test Scenario DescriptionExpected Outcome
    1Enter 0 to 5 characters in password fieldSystem should not accept
    2Enter 6 to 10 characters in password fieldSystem should accept
    3Enter 11 to 14 character in password fieldSystem should not accept

    Examples : Input Box should accept the Number 1 to 10

    Here we will see the Boundary Value Test Cases
    Test Scenario DescriptionExpected Outcome
    Boundary Value = 0System should NOT accept
    Boundary Value = 1System should accept
    Boundary Value = 2System should accept
    Boundary Value = 9System should accept
    Boundary Value = 10System should accept
    Boundary Value = 11System should NOT accept

    Why Equivalence & Boundary Analysis Testing

    1. This testing is used to reduce 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 large number of variables/inputs
    Summary:
    • Boundary Analysis testing is used when practically it is impossible to test large pool of test cases individually
    • Two techniques - Equivalence Partitioning & Boundary Value Analysis testing techniques is 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

Comments

Popular posts from this blog

Handling Dynamic Web Tables Using Selenium WebDriver

Importance of testng.xml file

Read it out for TESTNG before going for an iterview