Discussion:
What does "test-driven development" mean in your organization?
David Karr davidmichaelkarr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [seajug]
2014-05-10 16:46:32 UTC
Permalink
I would assume that anyone reading this has a pretty clear idea of what
"test-driven development" (TDD) means, but perhaps there are subtle
variations between organizations.

The basic idea is pretty clear, even if there are numerous ways to say it.
You write and run test assertions before you write the code to fulfill
those assertions. You can argue about the wording (please don't) but
that's the basic idea.

This can be applied to any level of test (unit, integration, acceptance,
system, et cetera), but it's typically associated with unit tests.

One thing that might happen in organizations is that they assume that TDD
refers to the entire process of writing and running unit tests. If an
organization strictly follows TDD, according to the common definition, then
that's effectively what it is, the entire process of writing and running
unit tests, because you never do it in a different way.

However, it's also entirely possible that unit tests are written for
existing code, instead of using a TDD process (again, according to the
"standard" definition). This can happen for various reasons, but it does
happen. In fact, in many organizations that do write unit tests, this is
how almost all unit tests are written.

It seems possible to me (because I'm seeing it happen) that some
organizations will espouse a practice they call "test-driven development",
which simply means to them that developers are writing unit tests, without
any understanding of how that happens.

I can understand why this would happen. The phrase "test-driven
development" is nice and snappy, and there isn't really a nice sounding
phrase for the overall practice of writing and running unit tests, even if
that's what management wants to ensure is happening.

What is your experience in the organizations you've worked for? How common
is it to have developers writing unit tests for existing code, but having
the organization refer to it as "test-driven development"?

Personally, I've concluded that if I work for a large company and they
decide to call a luxury yacht a breadbox, I will happily ask them how large
an engine they want for their breadbox. However, when I talk to the boat
dealer, I obviously have to use the terms that are standard in the
industry. This is just how it is. I've tried to contest what I see as a
small misconception, but I've been told to "get off my high horse", so I
guess I have to adapt.
Scott Shipp scottashipp-1ViLX0X+lBJBDgjK7y7TUQ@public.gmane.org [seajug]
2014-05-10 17:29:34 UTC
Permalink
If you know of organizations in Seattle that are doing true TDD please let me know which ones they are. IME, people know about TDD but don't practice it.
The Software Craftsmanship Meetup had Robert C. Martin in to talk at ADP/Cobalt the other week and I went down there. I don't remember the name of the guy I ended up talking to after, but he was one of the ADP/Cobalt dev managers. He explained to me that with their growth, TDD hasn't been happening even though as an organization in general they profess to do TDD. So that's part of why they had 8th Light come in for the week. If anyone on here works at ADP/Cobalt maybe you can comment.
Anyway, I agree with what you're saying. TDD has suffered semantic diffusion (http://martinfowler.com/bliki/SemanticDiffusion.html).
On top of that I think I saw an outright attack on TDD by the guy that created Ruby recently and a response by Gary Bernhardt. If you can find that it's interesting.
I began to practice TDD where I work (ProQuest) as a means to advocate it further through the org but I don't really know how to...been trying to figure it out.
Scott
To: seajug-***@public.gmane.org
From: seajug-***@public.gmane.org
Date: Sat, 10 May 2014 09:46:32 -0700
Subject: [seajug] What does "test-driven development" mean in your organization?



























I would assume that anyone reading this has a pretty clear idea of what "test-driven development" (TDD) means, but perhaps there are subtle variations between organizations.


The basic idea is pretty clear, even if there are numerous ways to say it. You write and run test assertions before you write the code to fulfill those assertions. You can argue about the wording (please don't) but that's the basic idea.


This can be applied to any level of test (unit, integration, acceptance, system, et cetera), but it's typically associated with unit tests.

One thing that might happen in organizations is that they assume that TDD refers to the entire process of writing and running unit tests. If an organization strictly follows TDD, according to the common definition, then that's effectively what it is, the entire process of writing and running unit tests, because you never do it in a different way.


However, it's also entirely possible that unit tests are written for existing code, instead of using a TDD process (again, according to the "standard" definition). This can happen for various reasons, but it does happen. In fact, in many organizations that do write unit tests, this is how almost all unit tests are written.


It seems possible to me (because I'm seeing it happen) that some organizations will espouse a practice they call "test-driven development", which simply means to them that developers are writing unit tests, without any understanding of how that happens.


I can understand why this would happen. The phrase "test-driven development" is nice and snappy, and there isn't really a nice sounding phrase for the overall practice of writing and running unit tests, even if that's what management wants to ensure is happening.


What is your experience in the organizations you've worked for? How common is it to have developers writing unit tests for existing code, but having the organization refer to it as "test-driven development"?


Personally, I've concluded that if I work for a large company and they decide to call a luxury yacht a breadbox, I will happily ask them how large an engine they want for their breadbox. However, when I talk to the boat dealer, I obviously have to use the terms that are standard in the industry. This is just how it is. I've tried to contest what I see as a small misconception, but I've been told to "get off my high horse", so I guess I have to adapt.
Eric Jain eric.jain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [seajug]
2014-05-10 18:34:23 UTC
Permalink
Post by Scott Shipp scottashipp-1ViLX0X+***@public.gmane.org [seajug]
You write and run test assertions before you write the code to fulfill those assertions.
I'd call that "test-first" development, and would consider a project
to be "test-driven" as long as the the unit tests are written together
with the main code (and can therefore inform the design).

If writing any unit tests is put off until later, or even handed off
to a separate team, that's clearly "breadbox-driven" development :-)
--
Eric Jain
Got data? Get answers at zenobase.com.


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/seajug/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/seajug/join
(Yahoo! ID required)

<*> To change settings via email:
seajug-digest-***@public.gmane.org
seajug-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
seajug-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/
kingn@u.washington.edu [seajug]
2014-05-10 22:55:06 UTC
Permalink
Component testing done by a developer/engineer and the subsequent coverage reports and further analysis of the code itself is one part of the testing process.


When you emphasize "TDD" specifically, you are emphasizing that the acceptance testing is defined prior to the work and that bugs are proved broken and then fixed by new tests.


System tests and how they are handled w.r.t. future components is probably not part of your question.


Sounds like a "slash-dot" style of question which often leads to amusing or heated responses and useful ones too.


:)
-Nichole
Curt accounts-btb23tk7IFT2eFz/2MeuCQ@public.gmane.org [seajug]
2014-05-18 18:46:08 UTC
Permalink
BTW, I think this might be the blog post where Bernhardt responds to DHH about TDD:

https://www.destroyallsoftware.com/blog/2014/tdd-straw-men-and-rhetoric
Post by ***@u.washington.edu [seajug]
Component testing done by a developer/engineer and the subsequent coverage reports and further analysis of the code itself is one part of the testing process.
When you emphasize "TDD" specifically, you are emphasizing that the acceptance testing is defined prior to the work and that bugs are proved broken and then fixed by new tests.
System tests and how they are handled w.r.t. future components is probably not part of your question.
Sounds like a "slash-dot" style of question which often leads to amusing or heated responses and useful ones too.
:)
-Nichole
Loading...