- Did you know that tests have a design?
- Did you know that the design of tests is critical to the success of the project as a whole?
- Did you know that the problem of Fragile Tests is a design problem?
- Did you know that the SOLID principles apply to tests as well as to the production code?
- Did you know that the code drives the tests just as the tests drive the code?
- Did you know that test naming is part of test design?
Those are some of the things you are going to learn in this episode of Clean Code. Episode 21: Test Design.
And the bottom line is this: Tests are part of the code of your system. They are not a different class of code. They are not a different species of code. They are not somehow inferior or less important. The code in your tests is part of the code of your system! And therefore the code in your tests has to be planned, and designed, and cared for with the same zeal, and effort, and conscience as the production code!
The penalty for failing to hold your test code to the same high standard of your production code, is that your tests will rot, and your production code will follow.
So, no pressure or anything, but in this episode you're going to learn some of the rules, techniques, and principles of: Test Design.