TDD (Test Driven Development) for beginners

by percent20 6/13/2007 1:07:00 PM

I have been wanting to learn TDD for a long time now and finally took the plunge and bought a book over it.  It is “Test Driven Development in Microsoft .NET.” I have only started the book, but already I understand TDD a little more than what I did before and most of that has to do with a few steps it laid out quite simply.  It is basically the process you go through when writing your code.

  1. Write the Test Code

  2. Compile the Test code (It should fail since you haven’t implemented anything yet)

  3. Implement just enough to compile

  4. Run the Test to see it fail

  5. Implement just enough to make it pass

  6. Run test to see it pass

  7. Refactor for clarity and eliminate duplication

  8. Repeat from top

For me I understood this, even though it was till hard to figure out, but what I didn’t “get” that was ok to have happen was step 2 which is in bold. It is ok for your compiled test to not compile.  The great thing about TDD is that it is one of those things you can do in almost any language I mean heck you can do TDD with PHP. PHPunit.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

TDD | Programming

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

7/25/2008 12:52:06 AM

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen


My Flare

AddThis Feed Button

National Blog Posting Month

Eagle Scout

I'm Test Driven

[Reserved for MVP status I want to earn]

View Buddy Lindsey's profile on LinkedIn

Twitter



Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in