Support unavailable
Please try again later

Obey the Testing Goat! Rigorous Test-Driven Web Development with Django and Selenium

tl;dr: - Covers the same material as the official Django tutorial, but with full TDD. - Browser-based testing with Selenium + in-depth unit-testing; - TDD Discussions: what to test, what not to test; - Aimed at beginners (new to Django, TDD or Selenium)

It’ll be similar to my talk from last year, but COMPLETELY REWRITTEN thanks to insights derived from writing my book. There will be loads of NEW STUFF like Django 1.5, and the whole flow of the talk now MAKES LOADS MORE SENSE.

Come prepared! you’ll need Git, Firefox, Python2.7, Django1.4/1.5 and Selenium installed

http://www.tdd-django-tutorial.com/

The idea is to run through the steps covered by the official Django tutorial, covering the essentials of Django from a beginner’s point of view. However, at each stage, instead of “just” writing the Django code required to build our site, we first write tests.

And we don’t just write unit tests! We start by writing “functional” or “acceptance” tests, using Selenium - which means driving a real browser, and checking the actual behaviour of the site as it is rendered from the user’s point of view – which might include JavaScript!

[update] – the best way of keeping up with what happened in this talk is to take a look at my book about TDD and web development, available freely (and paid-for if you like) at my website.

in on Tuesday 2 July at 14:30 See schedule

Comments

  1. Gravatar
    Dear tutorial attendees!

    I hope you've enjoying the first day at EuroPython as much as I did! And thanks so much for signing up for my TDD talk.

    Just a little reminder -- I just wanted to ask you to please, please come prepared, with all the required software installed:

    - Firefox
    - Git
    - Python 2.7
    - Django 1.5
    - Selenium 2.33

    Since this is a talk about TDD, I'll give you a test to run, which will check that everything is installed correctly:

    import django
    from selenium import webdriver
    browser = webdriver.Firefox()
    browser.get('http://www.google.com')
    if "google" in browser.title.lower() and django.VERSION[1] == 5:
    print "OK"


    Also, can you check out my example repository to a folder on your hard drive?

    git clone --branch worshop https://github.com/hjwp/book-example.git harrys-tdd-workshop

    that will put it into a folder named "harrys-tdd-workshop", which I'll get you to work from tomorrow.


    So please, please do get those bits installed and the repo checked out before you arrive tomorrow. It's really not fair on the people who do the prep if we all have to wait for people who haven't.

    I'm looking forward to meeting you all!
  2. Gravatar
    aaaah, the challenges of HTML entity escaping... Maybe I should write a chapter on how to test that!
  3. Gravatar
    git clone --branch workshop https://github.com/hjwp/book-example.git harrys-tdd-workshop

    works a little better :)

New comment


Language
EN
Duration
240 minutes (inc Q&A)

Tagged as

django testing selenium tdd
Our Sponsors
Spotify
Python Experts
SSL Matrix
Wanna sponsor?