TDD and our test examples
After I introduced the concept of Test-Driven Development in Chapter 2, Test Automation and Test-Driven Development, I did not pay any attention to the topic until now. In fact, I deliberately evaded to use TDD as our way of working for mainly one reason:
This is most probably the context in which most of you will start applying test automation.
Now, what if you had applied TDD to our test examples?
To be honest, it wouldn't have looked much different, as a lot of the TDD principles were implicitly exercised by:
- Defining your customer wishes by means of the ATDD scenarios, you created yourselves a sufficient set of tests, that is, a test list.
- Implementing your tests with the 4-steps recipe.
With the latter, we:
- Took small steps.
- Created a structure for each test based on the GIVEN-WHEN-THEN tags.
- Constructed the real code to get it to work...