O'Reilly logo

Mastering Software Testing with JUnit 5 by Boni García

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Boundary analysis

As any programmer knows, faults often appear at the boundary of a equivalence class (for example, the initial value of an array, the maximum value for a given range, and so on). Boundary value analysis is a method, which complements equivalence partitioning by looking at the boundaries of the test input. It was defined by the National Institute of Standards and Technology (NIST) in 1981 as:

A selection technique in which test data are chosen to lie along ‘boundaries’ of the input domain [or output range] classes, data structures, and procedure parameters.

All in all, to apply boundary value analysis in our tests, we need to evaluate our SUT exactly in the borders of our equivalence class. Therefore, typically two tests ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required