fbpx

Boundary value analysis — typically shortened to BVA — is a commonplace black box testing technique. The approach tests for software defects by verifying input values on the boundaries of allowable ranges.

This article will explore what boundary analysis testing is, why it’s useful, and explore some different approaches, techniques, and various boundary testing tools.

 

What is boundary value analysis in software testing?

Static Testing in Software Testing - What is It, Types, Process, Approaches, Tools, & More!

Boundary value analysis is a type of functional testing. That type of testing is concerned with verifying that each function of the software meets requirements and specifications. In the case of boundary testing, this functionality includes how the software deals with various inputs.

BVA is a software testing technique that validates how software will respond to inputs at or around the edge of input boundaries. In essence, each input has allowable ranges. For example, you might have a password box for a login that accepts passwords between 8 and 12 characters. Boundary testing will test for passwords with character lengths of 7, 8, 12, and 13.

The thinking here is that the boundaries of the limits, i.e., 7, 8, 12, and 13, are more likely to throw errors than numbers inside the boundaries, such as 9, 10, and 11. While the benefits here might seem marginal in an example of a field box that accepts between 8 and 12 characters, they become more obvious when you need to write test cases for field boxes that take between 1 and 20 characters or numbers between 1 and 1000, and so on.

So, to save time and reduce the number of test cases within functional testing, boundary value analysis looks at values:

  • At minimum value
  • Directly below the minimum value
  • At maximum value
  • Directly above the maximum value

 

Benefits of boundary value analysis in testing

QA Testing - What is It, Types, Processes, Approaches, Tools, & More!

Boundary testing has several compelling benefits for QA teams.

#1. Better software quality

The nightmare scenario for testers is bugs and defects that go unnoticed. With so many things to verify, some defects can slip through the cracks. Boundary testing proves the functionality of areas in the software that are more likely to contain errors, which leads to better software builds and, ultimately, a more reliable, stable application.

#2. Increased test coverage

BVA in software testing is so useful because it helps cut down on the number of test cases required for comprehensive test coverage. Boundary value analysis ensures that important values and that each value can be tested more thoroughly.

#3. Early defect detection

Boundary value testing is part of an approach that prioritizes early defect detection. Catching bugs early in the process means that development teams can save time and money without even mentioning the fact that it’s far easier to remedy bugs in the early stages of development.

#4. Efficiency

Boundary value testing is super efficient because it mitigates the requirement for a lot of test cases. Indeed, reducing inputs down to all but the most likely to cause issues can significantly save testing teams time both writing and executing test cases.

 

Drawbacks of boundary value analysis in testing

Different software and QA methodologies

Of course, no software testing technique is perfect or without its limitations. While boundary value analysis has many benefits, there are some constraints to working with this functional testing technique.

#1. Narrow scope

BVA works on the boundaries or edges of valid data inputs. In general, it ignores the middle inputs by reasoning that they will be fine if the valid inputs on the edges are. However, it’s not without precedent that some of these values that are untested could have issues.

#2. Overly simplistic

Boundary analysis is about making things simple. While this works for reducing test cases, the approach is less suitable for highly complex domains with multiple boundaries, interactions, or dependencies. Indeed, it can struggle to handle complex scenarios, meaning you need to explore other techniques for adequate coverage.

#3. Assumptions

Any process that attempts to boost efficiency risks missing out on particular errors. BVA focuses on boundaries at the edge of a range. In doing so, it must make assumptions about other inputs that fall on either side of boundary values. Testers must strike a balance between efficiency and coverage, which poses a slight risk if boundary testing is used alone.

#4. Reliance on accurate specifications and requirement

Efficient BVA is dependent on the quality and accuracy of specifications and requirement documentation. Any unchecked errors in these documents can bleed into boundary value testing and lead to specific errors going unchecked and undiscovered until the critical late stages of development.

#5. Reliance on equivalence classes

Performing thorough BVA requires a strong working knowledge of equivalence classes. Setting these classes accurately requires experience and some background information of the application.

 

Challenges of boundary value analysis

in software testing

challenges-load-testing

By now, you should be fairly clear about the pros and cons of boundary testing. However, if you want to implement the approach into your own software testing, you must also be aware of the various challenges that you must overcome.

Here are some of the challenges of implementing boundary value testing in software testing.

 

#1. Outlining boundaries

Identifying boundaries within simple systems poses little challenges for competent testers. However, there are more complex situations, such as:

  • Complex input domains with diverse input variables or intricate relationships
  • Undocumented boundaries that have not been clearly outlined in specification documents
  • Dynamic boundaries that change based on user actions or other conditions

 

#2. Ambiguous requirements

Poorly written or unclear requirement documents can hinder the identification of boundary values. Clarity, completeness, and a commitment to exhaustive specification documents take time, but they will pay off in the end.

 

#3. Expertise

Boundary value analysis can be deceptively complex. Indeed, testing teams need personnel with experience and knowledge of the field to understand the subtle nuances of the technique. What’s more, testers need to bring some knowledge of the software to bear or, at minimum, have reliable specification documents to fall back on.

 

IS YOUR COMPANY IN NEED OF

ENTERPRISE LEVEL

TASK-AGNOSTIC SOFTWARE AUTOMATION?

#4. Errors

Boundary analysis seeks to strip back the number of test cases required to verify valid and invalid inputs. However, defects that lie outside the testing range can easily go unnoticed. Moreover, “off-by-one” errors are common coding mistakes that can occur at or close to the boundaries. Testers must be conscious of these scenarios and make provisions for testing.

 

#5. Test case explosion

With multiple input boundaries at play, test cases can soon become complex and multiply out of control. In these situations, the time and money that you can save with boundary testing are lost, undermining the benefits of the solution. Complex software builds with lots of combinations or permutations can have a similar effect.

 

#6. Analysis tool limitations

Software test automation tools can help teams perform adequate boundary value analysis. However, even in the best cases, these tools require some manual intervention for both testing and test creation. This situation can be exacerbated for complex builds with multi-variable interactions.

 

Different types of boundary value

testing in software testing

checklist software testing processes

In the book Software Testing: A Craftsman’s Approach, the authors Paul C. Jorgensen and ‎Byron DeVries describe four different types of boundary value testing, which are:

 

1. Normal Boundary Value Testing (NBVT)

  • Tests valid input values at edges of the input domain
  • Explores minimum and maximum values alongside inputs just above and below the boundary
  • This is the classic type of boundary value analysis

 

2. Robust Boundary Value Testing (RBVT)

  • Similar to NBVT above, but includes invalid inputs, too
  • Tests at and just beyond boundaries, but also accounts for invalid inputs
  • Focuses on finding errors from extreme or unexpected outputs

 

3. Worst-case Boundary Value Testing (WBVT)

  • Verifies software behavior using extreme valid and invalid values
  • Explores values at the edge of input domains and values beyond these boundaries
  • Seeks to understand software behavior under more extreme conditions

 

4. Robust Worst-case Boundary Value Testing (RWBVT)

  • Uses a blend of RBVT and WBVT for the most thorough boundary value testing
  • Tests valid and invalid input values at both typical and extreme boundaries
  • Offers the best opportunity to find boundary-related defects

 

These approaches differ in comprehensiveness, with RWBVT being the most thorough. However, testers must acknowledge the extra investment in both time and effort required to unlock this additional level of defect discovery.

 

Equivalence partitioning and boundary value

analysis: similarities and differences

clearing up some confusion in software testing automation

Equivalence partitioning and boundary value analysis are often used in conjunction with each other. Indeed, the two techniques are highly complementary. However, they describe distinct approaches to validating data input. Here’s a look at the similarities and differences between the two.

 

1. Similarities

Equivalence partitioning and boundary value analysis make a great pair. Here are some of the similarities between both techniques.

  • They are both black box testing techniques, meaning the focus on inputs and outputs, which can be tested without a priori knowledge of the application’s source code.
  • They are both part of a thorough approach to testing inputs
  • They both help testers strike a balance between comprehensive test coverage without writing an excessive amount of test cases.

 

2. Differences

To explore the differences between equivalence partitioning and boundary value analysis, we need to look at each in isolation.

Equivalence partitioning

  • Divides input data into equivalence classes that should result in similar system outputs
  • Uses a single representative value from each class and tests the system with that value
  • It is concerned with identifying valid and invalid equivalence classes

 

Boundary value analysis

  • Tests the values at the boundaries or edges of equivalence classes
  • Test a number of values, including minimum, maximum, and values on either side of the boundary
  • Looks for errors that are found on the edge of boundaries

 

Equivalence partitioning and boundary value analysis examples

To help cement your understanding of equivalence partitioning and boundary value analysis, here are some examples.

Equivalence partitioning example:

Let’s say that you have an input box for car registrations. Typically, US car registration plates have between 6 and seven characters. For the sake of simplicity, we’ll discount specialty number plates.

Valid data = Plates 6 or 7 characters

Invalid data = Plates with >6 or >7 characters.

 

Boundary value analysis example:

Using the same number plate example as above, boundary analysis will test

Valid data = Plates with 6 or 7 characters

Invalid data = Plates with 5 or 8 characters, and in some scenarios, 4 and 9 characters

 

Boundary value analysis example

benefits of alpha testing and rpa

Perhaps the best way to fully understand the concept is by looking at another boundary value analysis example or two.

 

Boundary value testing example #1

To explore boundary value testing in more detail, let’s look at an example of an age verification domain.

We have a box where the user can enter their age.

Boundary values are:

IS YOUR COMPANY IN NEED OF

ENTERPRISE LEVEL

TASK-AGNOSTIC SOFTWARE AUTOMATION?

  • Minimum age = 18
  • Maximum age = 120

 

Boundary test cases example:

There are a total of six test cases:

  • 17, 18, and 19, which are below minimum, minimum, and above minimum, respectively
  • 119, 18, and 19, which are below the maximum, maximum, and above the maximum, respectively

 

Boundary value testing example #2.

In our next boundary testing example, we’ll explore a website with a minimum value purchase discount of 20% on orders of $100 and more.

In this example, a purchase of over $600 leads to a 25% discount. The boundary value test will deal with inputs between $100 and $600.

Boundary values are:

Minimum qualifying discount = $100

Maximum qualifying discount = $600

 

Boundary test cases example:

Again, we generate a total of six test cases, which are:

  • $99.99, $100, and $100.01, which are below minimum, minimum, and above minimum, respectively
  • $599.99, $600, and $600,01, which are below the maximum, maximum, and above the maximum, respectively

 

Is boundary testing in software testing accurate?

alpha testing vs beta testing

In the research paper Black Box Testing with Equivalence Partitioning and Boundary Value Analysis Methods, the authors explore using equivalence partitioning and boundary value analysis to test an academic information system for Mataram University in Indonesia.

The authors used the popular open-source testing tool Selenium for its tests and ran a total of 322 test cases. Equivalence testing and boundary value analysis unearthed about 80 failed cases, which led to a roughly 75:25 ratio of valid to invalid test scores. Overall, using a combination of equivalence partitioning and BVA in software testing led to thorough and helpful testing for the software.

 

Best boundary value testing tools

ZAPTEST RPA + Test Automation suite

While dedicated boundary testing software tools are rare, there are many notable testing tools that are capable of the job.

#3. TestCaseLab

TestCaseLab is a cloud-based test management tool that can help with BVA testing. The software allows teams to create and manage test cases from its intuitive and attractive-looking UI. TestCaseLab is flexible and feature-packed, but it has its constraints, including limited reporting and customization options.

 

#2. Micro Focus UFT One

Micro Focus UFT One is a software testing tool with a focus on functional and regression testing. It supports different platforms, devices, and API testing and offers strong integration options. It offers both no-code and keyword-driven test creation and can help teams build boundary value analysis test cases with ease. There are some limitations you need to consider, such as a steep learning curve and a lack of power when compared with tools like ZAPTEST.

 

#1. ZAPTEST

Agile DevOps Test Automation: Explaining the ZAPTEST mockup-based automation approach

ZAPTEST is a comprehensive software automation testing tool with advanced RPA capabilities. It’s built to provide testers with a user-friendly and robust suite of test automation tools that can help verify software in a variety of ways, including with BVA in software testing.

Some of the most compelling use cases for ZAPTEST to help boundary value analysis include test case generation, test data handling, test execution, and reporting and analysis. With a range of templates and a high level of customization combined with no-code test case creation, ZAPTEST users can quickly and easily create and manage robust test cases for all types of boundary analysis.

On top of test case generation and management, ZAPTEST’s RPA capabilities can help testing teams with their boundary value analysis testing in other ways. For example, you can automate test case execution, generate test data, and build powerful integrations with other testing tools.

 

Tips for boundary value testing

  • Combine boundary value analysis with equivalence partitioning to ensure your test cases cover various input scenarios
  • Use invalid input scenarios (i.e., negative testing) to ensure you verify how the software handles errors and unexpected inputs
  • Invest time into identifying boundary values for different data types like text, numbers, Boolean, etc.
  • Prioritize boundary value testing for critical functionalities or areas where errors are more likely to occur
  • Use realistic data that represents the kind of data your users will input into your domains.

 

Final thoughts

Boundary value analysis is a useful functional testing approach. When you have an input domain, you need to check that it accepts valid data and sends error messages when it receives invalid data. Boundary analysis testing helps verify that functionality in an efficient way by building only the test cases required for comprehensive testing.

Boundary testing looks at values in or around the acceptable range and verifies how the system responds to these inputs. The upshot is lots of saved time and reduced effort because you don’t need to build redundant test cases. In the fast-paced world of software development, where deadlines seem to come thick and fast, testing teams need all the help they can get.

Download post as PDF

Alex Zap Chernyak

Alex Zap Chernyak

Founder and CEO of ZAPTEST, with 20 years of experience in Software Automation for Testing + RPA processes, and application development. Read Alex Zap Chernyak's full executive profile on Forbes.

Get PDF-file of this post

Virtual Expert

ZAPTEST

ZAPTEST Logo