Greg Hewgill (ghewgill) wrote,
Greg Hewgill
ghewgill

test driven development

As I've been working on shaback, I've been wanting a faster way of doing testing. Since shaback uses the Amazon S3 service, it takes a certain minimum amount of time (due to latency) to do any operation, and it adds up quickly for lots of tests.

So, my solution is to implement a local server that acts like S3 for testing purposes. I found out about Park Place, but I'd like a solution in Python that doesn't require any nonstandard dependencies. Since this server is going to be part of a testing framework itself, a lightweight solution is desireable.

I thought this project would be a good one on which to practice TDD. So I set up a unit test framework using Python's unittest, and I've been doing strictly test-first development (that is, don't write code until you have a failing test). I've been editing the server code and test code side-by-side in my editor:

This is a bit different than the way I normally develop software, but I think it's good practice to try different methods. So far it's going well.

Subscribe

  • 2013 in review

    2013 is the year when everything changed. The biggest event was the birth of our daughter Lily. She was born prematurely in Shanghai while we…

  • 2012 in review

    2012 has been fairly quiet. Maybe it just seems that way because I haven't actually written anything new in this blog since last year's annual…

  • new photo galleries

    I've been busy processing photo galleries from the last year (or two) and putting them online for your perusal. Vancouver 2010 Northland…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 6 comments