Tests deter change...
When you write tests they cause code to become less maleable. They define how the code must behave.
Functional test (or user facing tests) tend to make requirements harder to change because to change a requirement you must change a test.
If your functional test reflects your implementation - it can be harder to make changes in the design of your application, because you must change the code that reflects your implementation. So, make sure your test reflects the domain rather than the implementation. (createAnonymous' and custom asserts are essential here).
Unit tests have the same effect. They are useful for thinking about how you will design a feature, but get in the way once you decide to change the design.
Use them carefully and wisely.
0 Comments:
Post a Comment
<< Home