Notes from interesting exercise where author was helping a client learn how to apply Test Driven Development and developer testing from scratch. The developer in question was very inquisitive and trying hard to understand how best to apply testing and even a little TDD. By @jeremydmiller.
The notes summary:
- The purpose of an automated test suite is to help you know when it’s safe to ship code and provide an effective feedback loop that helps you modify code.
- Test Driven Development (TDD) is primarily a low-level design technique and an important feedback loop for coding.
- When applying TDD, consider how you’ll test your code upfront as an input to how the code is going to be written in the first place.
- Approach any bigger development task by first trying to pick out the individual tasks or responsibilities within the larger user story.
- Focus on isolating validation logic into its own function where you can easily test inputs and do simple assertions against the expected state.
What author absolutely did tell his client was to try to approach any bigger development task by first trying to pick out the individual tasks or responsibilities within the larger user story. In the end, you want to be quick enough with your testing and coding mechanics that your progress is only limited by how fast you can think. Nice one!
[Read More]