March 2015
Intermediate to advanced
236 pages
5h 26m
English
An obvious happy path through the code might not hit any boundary conditions in the code—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 you might want to think about include:
Bogus or inconsistent input values, such as a filename of "!*W:X\&Gi/w$→>$g/h#WQ@.
Badly formatted data, such as an email address missing a top-level domain (fred@foobar.).
Computations that can result in numeric overflow.
Empty or missing values, such as 0, 0.0, "", or null.
Values far in excess of reasonable expectations, such as a person’s age of 150 years.
Duplicates in lists that shouldn’t ...
Read now
Unlock full access