December 2018
Beginner to intermediate
796 pages
19h 54m
English
While checking for the age, we have written three tests to cover the three ranges: 0-17 (fail), 18-65 (success), 66-99 (fail). Why did we do this? The answer lies in the fact that we are dealing with two boundaries: 18 and 65. So our testing needs to focus on the three regions those two boundaries define: before 18, within 18 and 65, and after 65. How you do it is not crucial, as long as you make sure you test the boundaries correctly. This means if someone changes the validation in the schema from 18 <= value <= 65 to 18 <= value < 65 (notice the missing =), there must be a test that fails on the 65.
This concept is known as boundary, and it's very important that you recognize them in your code so that you can ...
Read now
Unlock full access