Tuesday, April 12, 2005

TDD Initial Reactions

At first, I wasn't sure how I would apply TDD to a project whose sole goal is to communicate with another machine. The idea of TDD is to only test a small portion of code, and not to test outside dependencies(like the remote ftp server). If I write a test on the Connect() method of my FTP Client, I am testing my code, but I am also testing a whole list of other stuff, too.

Here's a non-exhaustive list of things being tested in this case:
  • Local Network Hardware
  • Local Network Connection
  • Remote Network Connection
  • Remote Network Hardware
  • Internet Latency
I have managed to test several pieces of the classes already, though, and avoided those dependencies. After about 20 minutes, I have 4 tests spanning two small classes. The real test will be when I start developing the Engine class, though. So far I have just coded/tested helper classes.

I'll keep you informed.
Listening to: Serial Thrilla - The Prodigy - The Fat Of The Land (05:11)

No comments: