We recommend that you follow the Test-Driven Development (TDD) approach to develop code. Writing tests before code results in a clear understanding of the complexity and dependencies of the code unit being written. In my experience, this leads to better design and better code.
The best projects that I worked on recognize that unit tests are more important than the source code. Applications evolve. Architectures of a few years back are legacy today. By having great unit tests, we can continuously refactor and improve our projects.
A few guidelines are listed as follows:
- Unit tests should be readable. Other developers should be able to understand the test in less than 15 seconds. Aim for tests that serve as documentation ...