September 2017
Beginner
278 pages
4h 24m
English
If nothing about the system or its environment changes, then the result of a test should not change. If a test is passing on my system today but failing tomorrow even though I haven't changed the system, then that test is unreliable. In fact, it is invalid as a test because its "failures" are not really failures – they're an "unknown" result disguised as knowledge. We say that such tests are "flaky" or "non-deterministic."
Some aspects of a system are genuinely non-deterministic. For example, you might generate a random string based on the time of day, and then show that string on a web page. In order to test this reliably, you would need two tests:
Read now
Unlock full access