Photo by Mykenzie Johnson on Unsplash

Testing is like double-entry bookkeeping.


You should not make assumptions. Always test.


Testing makes it certain that you are moving in the right direction.

Test small, test often, and test fast.


It is cheaper to fix things earlier.

Keep your test coverage 100%. A good way to do that is that every new line of commits should have test coverage 100%.

Test isolated pieces (Unit Test) before testing with other components (Integration Test).

TDD is 50% more efficient in the long term.

Testing is insurance. It may not find anything but when it does it saved big time.

The cleaner your code, the cleaner the tests. A good code is testable.

Writing unit tests first only works well when you know exactly what you want to write. If you are experimenting. It may be useless.

Every new bug should get a new test written first. (adopted from Facebook Engineering)

Keep your overall QC process as automated as possible.

Like SpaceX, push beyond failure during testing/development. So you can ensure everything goes well in prod.

Medical Field

The more you test, the more data points you have. The easy it will be to isolate the infected and avoid disease spread.

Test the most critical things often.


You never accept the alternative hypothesis. You always reject it. You would rarely know if a hypothesis is 100% current. Unless it is a logical statement.

To test, you can plug the numbers right in and see if the equation holds.


If you are learning, you can only know if you have learned right by testing yourself.

DRAFT automated tests //developer productivy