Aaron Chesny's Agile Java Blog

November 1, 2009

Where TDD Starts – Part I

Filed under: Uncategorized — Honcho @ 12:39 pm

One of the major aspects of quality in a software product is that the sooner in a process that you identify a defect the less expansive it is to fix. TDD adress this aspect by starting development with the test first. By “driving” development from the test you ensure fewer defects.

But where do you start TDD?

I suggest that TDD should start at the story level. Story level tests run as if they were run against the software in a production environment. Testing at this level is also called black box, system, or end to end testing.

Consider the following system. A web service that is deployed on an application server that retrieves information from a database. The frameworks, languages, and application names are irrelevant for the example as these are black box tests. We need not be concerned about the inner works. In addition there is a requirement or story that reads like this:

As an end user I want a web service that will give me the total count of books in the library so that I can quickly provide usage numbers to management.

Q: What do we need to show to the product owner to prove that this story has been completed?

A: A working web service that retrieves the number of books in the library.

So let’s do this with a test that can be automated and become part of the regression test suite. This will ensure we don’t break this feature in the future.

Advertisement

1 Comment »

  1. I agree with you completely and if you haven’t read it yet there is good book on that very topic:

    Lean-Agile Acceptance Test-Driven Development

    Buy from Amazon

    Comment by trellin — August 1, 2011 @ 8:16 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.