...

/

Right-[B]ICEP: Boundary Conditions

Right-[B]ICEP: Boundary Conditions

Learn how to tackle the edge cases in writing unit tests.

An obvious happy path through the code might not hit any boundary conditions in the code, which are scenarios that involve the edges of the input domain. Many of the defects you’ll code in your career will involve these corner cases, so you’ll want to cover them with tests.

Boundary conditions:

Boundary conditions we might want to think about include:

  • Bogus or inconsistent input values, like a filename of "!*W:X\&Gi/w$→>$g/h#WQ@.
  • Badly formatted data, such as an email address missing a top-level domain
...
Access this course and 1400+ top-rated courses and projects.