Skip to content

Instantly share code, notes, and snippets.

@brianjbayer
Last active January 28, 2024 21:09
Show Gist options
  • Save brianjbayer/ee490bcf83e864d0d49e5dd44ac28477 to your computer and use it in GitHub Desktop.
Save brianjbayer/ee490bcf83e864d0d49e5dd44ac28477 to your computer and use it in GitHub Desktop.
Fundamentals of Testing 2: What values to test - Boundary-Value Analysis

Fundamentals of Testing 2: What Values to Test - Boundary-Value Analysis

In my last post (and the first of this series), I covered the three items comprising the intent of your testing when adding new behavior or changing existing behavior of your software system. In this post, I cover the most basic concept of which values to test as part of your Verification Testing.

Basically, you want to test the boundaries of the possible values that your software system must allow. This practice is called Boundary-Value Analysis which Wikipedia defines (rather well) as "a software testing technique in which tests are designed to include representatives of boundary values in a range" and is a part of the branch of Discrete Mathematics called Set Theory.

Consider this simple example. Your Product Owner provides you the following Acceptance Criteria for your software system: The system must accept and produce the correct behavior (which you can assume for this example is already well-defined elsewhere) for values between 1 and 100 inclusively. Using Boundary Value Analysis, you know that 1 is the minimum value (the lowest boundary of acceptable values) and 100 is the maximum value (the highest boundary). Thus, you must test your system with both values of 1 and 100, which are the Boundary Values.

There is actually one more (class of) value that you should test to complete the testing for this Acceptance Criteria which I will cover in my next post in this series.

I often encounter situations where the Boundary Values were not tested. For example, on many streaming services, if you stop watching an episode of a series at the very end, but before the next episode starts, and you come back later to watch the next episode, it actually starts at the beginning of the episode that you just finished.


⏭️ Fundamentals of Testing 3: What Values to Test - Equivalence Class Partitioning

⏮️ Fundamentals of Testing 1: The Three Things to Prove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment