How to Waste Time on TDD
Join the DZone community and get the full member experience.Join For Free
This blog post was originally written by Piotr Włodarek on his TheSingularity.pl blog. I liked it so much that I translated it to English, so that it can reach a broader audience.
Some people argue that TDD slows down the development process. If you want to follow this opinion here's what you should do:
- Write tests after writing the production code.
- Waste no time thinking about designing, simply jump straight into the TDD loop and do 100% of the design work there. You'll have a chance to change your code and tests structure over and over again.
- Learn how to write test scenarios completely on your own, don't bother watching any screencasts and don't read any books on the topic.
- Make sure your tests load at least half a minute before they actually start testing anything. You can easily achieve that by loading the whole framework and working with your old crappy HDD.
- Make sure all the features are tested through the GUI (by driving a web browser or desktop GUI window).
- Make sure all your tests depend on the database.
- Manually find the corresponding test file and the production code.
- Navigate between desktops, windows, tabs only to find the tests starting script.
- Try to write as few classes as possible to ensure every class has multiple unrelated responsibilities. These are guaranteed to be a testing nightmare.
- Write beautiful step definitions in Cucumber even if your customer doesn't care about reading your specs (or perhaps you don't even have a customer yet).
Published at DZone with permission of Andrzej Krzywda, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.