[LRUG] TDD (was: Ruby Contracting)
Francisco Trindade (Frank)
frank.trindade at gmail.com
Thu Feb 19 02:51:15 PST 2009
Tests are code, and are so difficult to write or maintain as
development code. If you want to write tests (and you should, IMO),
you have to be prepared to spend time writing it carefully, spend time
refactoring it, spend time erasing tests that are no long necessary,
etc...
Not mentioning the benefits for design that were already mentioned
before in this thread, I wouldn't like to get near of maintaining or
modifying non-tested ruby code. Regression tests give you the
confidence to change and know that everything is still working ,
specially in a dynamic language, and that is impossible to do using
manual testing.
Just my two cents.
Francisco Trindade
Software Consultant
ThoughtWorks UK
http://franktrindade.com
On Thu, Feb 19, 2009 at 10:42 AM, Chris Parsons
<chris at edendevelopment.co.uk> wrote:
> On 19 Feb 2009, at 10:22, Tom Stuart wrote:
>
>> Without taking sides, what surprises me is how few people say anything
>> about just how hard it is to write useful, robust, intelligible, non-brittle
>> tests (especially for e.g. Rails applications) and how much time it takes to
>> create and maintain them. Common wisdom is that this investment of time and
>> effort more than pays off in quality and stability but, well, is that
>> appealing idea necessarily always true? Is there really nobody in the world
>> who actually wastes time writing tests?
>
> I've wasted many hours writing tests for features for which the investment
> just wasn't justified, and kicked myself for not writing tests for things
> that really needed them. It's all part of the learning curve. Test where the
> risk is[1], and read blogs by people like Jay Fields and Pat Maddox - they
> have some very interesting discussion on testing techniques.
>
> I think the biggest mistake people make is thinking that starting to write
> tests is going to yield a huge instant payoff with no effort. There is a
> small instant payoff, a lot more learning, and a real danger of
> overconfidence.
>
> We need to write about testing on our blog more. It's not easy at all, but
> if you're disciplined about it does work for in your favour[2].
>
> Oh, and there are no sides here ... this is positive open-minded debate,
> right? :)
>
> Chris
>
> [1] Someone famous said this; no idea who.
> [2] Well, not when we're doing stuff for fun which doesn't matter much
> (http://ykyat.com :)
>
> --
> Chris Parsons
> Managing Director
> Eden Development (UK) Ltd
>
> chris at edendevelopment.co.uk
> www.edendevelopment.co.uk
>
> 0845 0097 094
> po box 425, winchester, so23 0wy, uk
> Map: http://pininthemap.com/edendevelopment
>
>
> Tried Pin in the Map? Mark a map location, add text, send to friends.
> http://pininthemap.com
>
> This electronic message and all contents contain information from the sender
> which may be privileged, confidential or otherwise protected from
> disclosure. The information is intended to be for the addressee(s) only. If
> you are not an addressee, any copying, disclosure, distribution or use of
> the contents of this message is prohibited. If you have received this
> electronic message in error, please notify the sender by reply e-mail and
> destroy the original message and all copies. The sender does not accept
> liability for any errors or omissions.
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
--
--
Francisco Trindade
More information about the Chat
mailing list