Problem solve Get help with specific problems with your technologies, process and projects.

Boundary analysis and equivalent partitioning

Equivalent partitioning and boundary analysis can make testing more thorough and manageable. Expert Karen N. Johnson explains how these methods work.

Could you please explain the difference between boundary value analysis and equivalent partition method and provide an example?

A boundary value analysis is when you look at a condition to understand its limitations while equivalence partitioning...

helps you group tests in order to select a manageable number of tests. Let's look at boundary analysis first. It's important to recognize that boundaries have lower limits as well as upper limits -- I point out lower boundaries because I often see testers focusing on maximum capacity but forgetting about lower boundaries. A simple boundary analysis would be the review of a single data entry field to determine its limits. In such an example, a lower limit might be that the data entry field is a required field so tests might include attempting to leave the field blank or using the space bar to create an entry. The upper limit tests might include attempting to enter more characters than the field accepts and attempting to exceed the field value in through any method available. I've sometimes exceeded field limits during the import of data in situations where the direct data entry page of an application does a fine job of upholding the limits, but import may not.

Equivalence partitioning is when you examine multiple values to determine where tests overlap or additional tests would not likely provide more value. Let's stay with a single data entry field as an example and imagine the field size is 15 characters and that the data entry field is for the entry of a person's first name. The upper boundary tests would include testing with 14, 15, and 16 characters -- effectively testing before, on and exceeding (or attempting to exceed) the maximum. Your equivalence partitioning might determine that the entries of a single character such as the letter a, b, or c will test the data entry field equally and therefore testing the data entry of every alpha character is not necessary. You might conclude that all alpha or numeric entries are of equal class, meaning you have no reason to suspect one character or one digit will cause a particular issue. You use this method to reduce the number of tests you need to execute.

To stay with this example, you might decide that special characters such as umlauts and accents may need to be tested. These special characters might include characters encountered with names while you also decide that other special characters not associated with people's names can be categorized into another group. This is equivalence partitioning. By grouping values into a partition you reduce the number of tests.

This example show how boundary value analysis and equivalent partition analysis work together. It's a case of looking for limits and then restricting the number of tests to a manageable set. This example was incredibly simple; most applications have numerous complex boundary conditions. Consider boundaries such as printing reports using volumes of data. Boundaries can be exposed in print buffers or boundaries in exporting data where an application allows a larger entry in a field than can be exported in a CSV formatted file.

Software testing resources:
Software assurance and risk management techniques

Find software bugs, defects using code coverage

Software testing and the business of borders

These are just two more examples. There can be many undefined and unrealized boundaries until a defect is found exposing new limitations. And equivalence partitioning can help you narrow the number of tests you need to execute in order to expose boundaries.

There are many good resources on the subject as well. Let me point out some references for further reading and learning.

  • Rob Sabourin wrote a three part article in Software Test & Performance magazine last winter on boundary analysis. See February, March and April 2007 issues, all of which you can find through www.stpmag.com/backissues2007.htm.

  • James Bach has a tool known as Allpairs to help you with equivalent partitioning, see www.satisfice.com/tools.shtml.

  • Cem Kaner has a series of videos on Google known as Black Box Software Testing. He explains the complexity of boundary analysis and discusses equivalence partitioning.

  • These are valuable areas to learn about because both boundary analysis and equivalence partitioning analysis transcend specific technologies or subject matters.

    This was last published in January 2008

    Dig Deeper on Software Testing and QA Fundamentals



    Find more PRO+ content and other member only offers, here.

    Have a question for an expert?

    Please add a title for your question

    Get answers from a TechTarget expert on whatever's puzzling you.

    You will be able to add details on the next page.

    Start the conversation

    Send me notifications when other members comment.

    By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

    Please create a username to comment.