This link has been bookmarked by 260 people . It was first bookmarked on 27 Apr 2006, by netklon.
-
30 May 17
-
23 Aug 16
-
25 Aug 15
-
16 Jun 15
-
01 Jun 15
-
09 Feb 15
-
01 Jul 14
-
27 Jun 14
-
it’s one way to think through your requirements or design before your write your functional code (implying that TDD is both an important agile requirements and agile design technique)
-
the goal of TDD is to write clean code that works
-
test first development (TFD)
-
Once the tests pass the next step is to start over (you may first need to refactor any duplication out of your design as needed, turning TFD into TDD)
-
TDD = Refactoring + TFD.
-
Instead of writing functional code first and then your testing code as an afterthought, if you write it at all, you instead write your test code before your functional code
-
A programmer taking a TDD approach refuses to write a new function until there is first a test that fails because that function isn’t present
-
they then do the work required to ensure that the test suite now passes (your new code may break several existing tests as well as the new one)
-
require great discipline
-
Acceptance TDD (ATDD)
-
Developer TDD
-
you'll write a single acceptance test, then to implement the production code required to fulfill that test you'll take a developer TDD approach
-
The challenge is that both forms of TDD require practitioners to have technical testing skills, skills that many requirement professionals often don't have
-
An underlying assumption of TDD is that you have a testing framework available to you
-
Your designs must consist of highly cohesive, loosely coupled components (e.g. your design is highly normalized) to make testing easier (this also makes evolution and maintenance of your system easier too).
-
TDD is primarily a specification technique with a side effect of ensuring that your source code is thoroughly tested at a confirmatory level
-
the greater the risk profile of the system the more thorough your tests need to be
-
Like it or not most programmers don’t read the written documentation for a system, instead they prefer to work with the code
-
Well-written unit tests do exactly this – the provide a working specification of your functional code – and as a result unit tests effectively become a significant portion of your technical documentation
-
Similarly, acceptance tests can form an important part of your requirements documentation. This makes a lot of sense when you stop and think about it. Your acceptance tests define exactly what your stakeholders expect of your system, therefore they specify your critical requirements. Your regression test suite, particularly with a test-first approach, effectively becomes detailed executable specifications.
-
A significant advantage of TDD is that it enables you to take small steps when writing software.
-
“The act of writing a unit test is more an act of design than of verification. It is also more an act of documentation than of verification. The act of writing a unit test closes a remarkable number of feedback loops, the least of which is the one pertaining to verification of function”
-
-
25 May 14
-
05 May 14
-
Introduction to Test Driven Development (TDD)
-
One view is the goal of TDD is specification and not validation
-
In other words, it’s one way to think through your requirements or design before your write your functional code
-
(implying that TDD is both an important agile requirements and agile design technique).
-
Another view is that TDD is a programming technique.
-
As Ron Jeffries likes to say, the goal of TDD is to write clean code that works. I think that there is merit in both arguments, although I lean towards the specification view, but I leave it for you to decide.
-
There are two levels of TDD:
-
Acceptance TDD (ATDD).
-
With ATDD you write a single acceptance test, or behavioral specification depending on your preferred terminology, and then just enough production functionality/code to fulfill that test.
-
The goal of ATDD is to specify detailed, executable requirements for your solution on a just in time (JIT) basis. ATDD is also called Behavior Driven Development (BDD).
-
With developer TDD you write a single developer test, sometimes inaccurately referred to as a unit test,
-
and then just enough production code to fulfill that test.
-
Developer TDD
-
Developer TDD is often simply called TDD.
-
The goal of developer TDD is to specify a detailed, executable design for your solution on a JIT basis.
-
-
26 Apr 14
-
19 Mar 14
-
11 Mar 14
-
10 Feb 14
-
31 Jan 14
-
27 Jan 14
-
10 Nov 13
-
22 Sep 13
-
22 Aug 13
-
TDD = Refactoring + TFD
-
- Acceptance TDD (ATDD). With ATDD you write a single acceptance test, or behavioral specification depending on your preferred terminology, and then just enough production functionality/code to fulfill that test. The goal of ATDD is to specify detailed, executable requirements for your solution on a just in time (JIT) basis. ATDD is also called Behavior Driven Development (BDD).
- Developer TDD. With developer TDD you write a single developer test, sometimes inaccurately referred to as a unit test, and then just enough production code to fulfill that test. The goal of developer TDD is to specify a detailed, executable design for your solution on a JIT basis. Developer TDD is often simply called TDD.
-
organically, with the running code providing feedback between decision
-
environment must provide rapid response to small changes
-
must consist of highly cohesive, loosely coupled components (
-
enables you to take small steps when writing software.
-
n 250,000 lines of functional code and 250,000 lines of test code.
-
-
17 Jul 13
-
03 Jul 13
-
Test-driven development (TDD) (Beck 2003; Astels 2003), is an evolutionary approach to development which combines test-first development where you write a test before you write just enough production code to fulfill that test and refactoring. What is the primary goal of TDD? One view is the goal of TDD is specification and not validation (Martin, Newkirk, and Kess 2003). In other words, it’s one way to think through your requirements or design before your write your functional code (implying that TDD is both an important agile requirements and agile design technique). Another view is that TDD is a programming technique. As Ron Jeffries likes to say, the goal of TDD is to write clean code that works. I think that there is merit in both arguments, although I lean towards the specification view, but I leave it for you to decide.
-
-
27 Jan 13
-
11 Jan 13
-
28 Nov 12
-
18 Nov 12
-
09 Oct 12
-
28 Sep 12
-
05 Aug 12
-
05 Jun 12
Lee Woodruff... approach hasn't been widely considered until now, another reason might be that many ... have never ... email me with suggestions. I also maintain ...
-
26 May 12
-
25 Apr 12
-
08 Feb 12
-
18 Jan 12
-
20 Dec 11
-
13 Dec 11
-
12 Dec 11
-
02 Dec 11
-
27 Nov 11
-
20 Nov 11
-
19 Oct 11
-
11 Oct 11
-
12 Aug 11
-
09 Jul 11
Avdi Grimm@avdi section 6: http://bit.ly/nuzN8A
-
24 Jun 11
-
12 Jun 11
-
13 Apr 11
-
12 Apr 11
-
08 Apr 11
-
10 Feb 11
-
08 Feb 11
-
03 Feb 11
-
24 Jan 11
-
23 Jan 11
-
06 Jan 11
-
03 Dec 10
-
11 Nov 10
-
09 Nov 10
-
16 Oct 10
-
25 Sep 10
Thomas BonkIntroduction to Test Driven Design (TDD): http://www.agiledata.org/essays/tdd.html via @addthis
– neolytian (neolytian) http://twitter.com/neolytian/statuses/25508428607 -
21 Sep 10
-
02 Sep 10
-
10 Aug 10
-
31 Jul 10
-
10. References and Suggested Online Readings
-
-
13 Jul 10
-
06 Jul 10
-
12 Jun 10
-
22 Apr 10
-
17 Feb 10
-
10 Feb 10
-
04 Dec 09
-
17 Nov 09
-
16 Nov 09
-
13 Nov 09
-
09 Nov 09
-
31 Oct 09
-
30 Oct 09
-
23 Oct 09
-
21 Oct 09
-
19 Oct 09
-
24 Sep 09
-
09 Sep 09
-
29 Aug 09
-
21 Aug 09
-
13 Aug 09
-
01 Aug 09
-
24 Jul 09
-
20 Jun 09
-
09 Jun 09
-
05 Jun 09
-
04 Jun 09
-
21 May 09
phoenix2lifeIntroduction to Test Driven Design (TDD)
-
23 Apr 09
-
15 Apr 09
-
22 Mar 09
-
01 Mar 09
-
The steps of test first design (TFD) are overviewed in the UML activity diagram of Figure 1. The first step is to quickly add a test, basically just enough code to fail. Next you run your tests, often the complete test suite although for sake of speed you may decide to run only a subset, to ensure that the new test does in fact fail. You then update your functional code to make it pass the new tests. The fourth step is to run your tests again. If they fail you need to update your functional code and retest. Once the tests pass the next step is to start over (you may first need to refactor any duplication out of your design as needed, turning TFD into TDD).
Figure 1. The Steps of test-first design (TFD).

I like to describe TDD with this simple formula:
TDD = Refactoring + TFD.
-
-
14 Feb 09
-
02 Jan 09
-
17 Dec 08
-
03 Nov 08
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.