[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] CONTRIBUTE - writing tests for understanding internals

From: Przemysław Wojnowski
Subject: Re: [PATCH] CONTRIBUTE - writing tests for understanding internals
Date: Thu, 12 Nov 2015 22:42:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

W dniu 12.11.2015 o 21:55, Eli Zaretskii pisze:
In TDD, they teach you to write a test for a spec that isn't
implemented yet.  The test fails, of course (which is a Good Thing:
now you know that your test indeed will catch a non-compliant
implementation), and then you implement the spec to see that it now
succeeds.  If you work that way, tests _do_ drive the development.

What do you mean by "spec" here?

I've never seen nor used TDD (and I use it very often) with "spec".
What I've seen, though, was using TDD to implement User Stories (Use
Cases), which are descriptions of functionality, but far from formal
specifications - if this is what you mean.

Anyway, TDD drives design (you implement only as much as is needed to
make the tests pass) and, by side effect, gives strong regression test
suite, which _enables_ refactoring.
Many TDD practitioners say that its result is good API.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]