TDD is dead. Long live testing.
david.heinemeierhansson.com
TDD is dead. Long live testing.
1–10 of 166 posts
Re: TDD is dead. Long live testing.
#2Part 1: http://www.justin.tv/confreaks/b/522089408 (starts at 11:00)
Re: TDD is dead. Long live testing.
#3As a frontend developer, I have been moving towards a greater emphasis on functional & integration testing. We're also using scripter here, a test tool that actually compares screen caps with the actual on-screen state of our applications. So a purely visual approach.
There's a wonderful world of testing tools out there. I can imagine it's incredibly daunting to a newcomer trying to decide which to pick up and run with, especially with so many job specs specifically asking for "TDD", and now with DHH saying this.
Re: TDD is dead. Long live testing.
#4Re: TDD is dead. Long live testing.
#5DHH's keynote from the first day of RailsConf, in which he talks a bit about testing and the general perception of writing software as "science", is online here: Part 1: http://www.justin.tv/confreaks/b/522089408 (starts at 11:00) Part 2: http://www.justin.tv/confreaks/b/522101045
Re: TDD is dead. Long live testing.
#6Re: TDD is dead. Long live testing.
#7I fully agree that TDD has turned into a cargo cult obsession for many developer shops. The benefits of unit tests are usually for the developer, but in over abundance can lead to inflexibility and debt when your system needs to change.
Re: TDD is dead. Long live testing.
#8If you are rapidly prototyping something then writing tests first is a hinderance. But if you have well defined requirements then writing tests first will save you time.
What's best will differ depending on whether you're designing a web app or building an interface to an SAP system or an external gateway. (My guess is that DHH does very little of the well defined interface building type stuff)
Re: TDD is dead. Long live testing.
#9Oh yes - I agree completely with this.
I'm not sure I agree with testing things with Capybara though. How are you sure your backend controller actions are doing what they're supposed to be doing? Sure your browser might render what you need but what if a model attribute is set to false instead of true? How do you account for that using a frontend test suite?
Re: TDD is dead. Long live testing.
#10I worry about a push away from unit tests. I can't imagine having to refactor a large application with only system-level integration tests to work with, especially in a dynamically-typed language like Ruby. I haven't written a Rails app in a long time though, maybe these days it's easier to just start over than to refactor.
But any bad day for dogma is a good day for the rest of us. Write software using whatever methodology works for you and always question the value of so-called "best-practices".