RSS
The Testing Goat

Obey the Testing Goat!

TDD for the Web, with Python, Selenium, Django, JavaScript and pals...

Intermediate TDD workshops in London and Portland

Thu 31 March 2016
By Harry

After many successful years of running my beginners' TDD/Django tutorial, I thought it might be time to have a crack at some more intermediate-level topics, so I'm announcing a couple of workshops.

The aim will be to cover some intermediate-level topics. It assumes you've already started doing a bit of TDD, you've wrapped your head around unit testing, and some basic mocking, but you're starting to ask questions like: What order should I write tests in? When should I mock, and when should I not? What are the pros and cons of isolated unit tests vs integration tests? What do people mean when they say "let the tests drive the design"?

I'm not claiming that I'll come up with perfect answer to these questions, or solve all your problems, but we will go through a worked example that will help to illustrate some of the tradeoffs, and hopefully help you to think about how to apply this for your own projects. It's based on chapters 17 and 18 in my book.

That London one is next Monday, so book up quick!

And come prepared! You'll need:

git clone https://github.com/hjwp/book-example/ tdd-workshop
cd tdd-workshop
git fetch --tags
git checkout chapter_17
mkvirtualenv --python=python3 tdd-workshop  # or however you like to create virtualenvs
pip install -r requirements.txt
pip install selenium
python manage.py test  # these should all pass

Ask me if you have any problems! [email protected]

[update monday PM]

If the functional tests are being strange, try switching from firefox to chrome.

  • Download chromedriver from here: https://sites.google.com/a/chromium.org/chromedriver/downloads

  • Extract it and add it to your path

  • Switch webdriver.Firefox() to webdriver.Chrome() in functional_tests/base.py

Comments

comments powered by Disqus
Read the book

The book is available both for free and for money. It's all about TDD and Web programming. Read it here!

Reviews & Testimonials

"Hands down the best teaching book I've ever read""Even the first 4 chapters were worth the money""Oh my gosh! This book is outstanding""The testing goat is my new friend"Read more...

Resources

A selection of links and videos about TDD, not necessarily all mine, eg this tutorial at PyCon 2013, how to motivate coworkers to write unit tests, thoughts on Django's test tools, London-style TDD and more.

Old TDD / Django Tutorial

This is my old TDD tutorial, which follows along with the official Django tutorial, but with full TDD. It badly needs updating. Read the book instead!

Save the Testing Goat Campaign

The campaign page, preserved for history, which led to the glorious presence of the Testing Goat on the front of the book.