The Book

"Test-Driven Web Development with Python" aims to teach TDD for web programming. It uses a concrete example -- the development of a website, from scratch -- to explain the TDD metholology and how it applies to building web applications. It covers the Selenium browser-automation tool, unit testing, mocking, and interacting with Web technologies from the basics of static content, database integration, throught the inescapable JavaScript, and onto more advanced (and trendy) topics like NoSQL, websockets and Async programming.

Reading it

There are lots of ways you can read this book:

Buy it on Amazon.com Buy it on Amazon.co.uk Buy a DRM-free epub/pdf from ebooks.com Read it on Safari Obviously these are my favourite options! O'Reilly have been great, they deserve your support, and although I only get a small amount in royalties (about a dollar per sale if you're curious), it still pays for the occasional dinner out every month which I appreciate. Plus, real physical books are nice... TIP: I don't recommend you use Google Play Books, or at least not their PDF version, it's horrible

Or read it here for free

Help yourself! It's all free and CC-licenced (thanks O'Reilly!). I see this as a "try-before-you-buy" scheme, and I hope that if you enjoy it you'll buy a copy -- if not for yourself, then perhaps for a friend!

Table of contents follows:

Introduction:

Epilogue and appendices:

How to comment

I feel incredibly lucky to be writing this book, and have the standard amounts of impostor syndrome. I've only actually been doing TDD for a couple of years, and I've only been a professional programmer for about 3 years. But I feel I've learned a lot, and I enjoy sharing the knowledge.

The O'Reilly site allows you to submit "errata", and the Chimera site has a comments function. Do use those for typos, errors etc. If you'd like to have a more philosophical discussion, you can get in touch with me directly via

You can even leave comments right here. The important thing is, get in touch! I look forward to hearing from you.