Why to write tests

A big part of writing good automated tests is understanding why to write each test. While this seems obvious, people rarely think about it.  When I write a test, I make sure that it achieves at least one of the following goals:

  1. Verify that the product meets the business requirements
  2. Give cover for future change
  3. Document intent

Continue reading