▸ Common knowledge? ▸ Some say that it means that you should write more unit tests than any other type ▸ Another interpretation is that unit tests are faster, and cheaper
TEST PARTIAL VALUES ▸ It would be impossible to test every possible output with every combination of the environment ▸ The combinatory of all those possibilities can easily go up to trillions of things to test
COVERING ALL LINES IS ENOUGH ▸ Covering all lines is not enough, because not all possible combinations are covered ▸ We like to trick the system by breaking functions to smaller pieces so we can cover all the lines ▸ This makes certain functions or classes more difficult to read
ALSO CODE ▸ Code needs to maintained ▸ Code contains bug ▸ Tests are code ▸ Your tests need maintenance and also have bugs ▸ Many changes in code need coordinated changes in tests ▸ In many code bases there are more lines of tests than application code
Unit tests are meant to reduce the risk of deploying bad code in production ▸ You need information in order to reduce risk ▸ Tests that never fail are not contributing any information