Starting point for my presentation on writing tests at the Opencode of 2011-12-01 in Quebec City.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

OpenCode 2011/12/01 presentation

This project will be used for my presentation about tests at OpenCode 2011/12/01 in Quebec City.

The content of this readme is pretty much final. You can follow the instructions to get ready for the workshop.

Reason I use Python and Pyramid instead of X

Because it's easy to write tests and there is practically no boilerplate code. Pretty much everything is exposed so it's ideal in the context of my presentation.


To participate in the presentation and/or the workshop after, you will need some stuff installed on your computer. I use Ubuntu 11.10, but you can use anything you want. The content of the presentation should work equally on OS X or Windows. I provide command lines for Ubuntu, but you can follow the links for other OSes.


First, you will need Python. I use 2.7 during the presentation, and I'm pretty sure 2.6 would be OK. Don't use <2.6 or 3.x.

Python 2.7 comes pre-installed with ubuntu 11.10.


Virtualenv allows you to isolate every Python environments for each of your apps. It's much like Bundle in Ruby. You can install it with

$ sudo apt-get install python-virtualenv

Create a directory to work in and a virtualenv

$ cd /home/yourname/src
$ mkdir opencode-tests
$ cd opencode-tests
$ virtualenv --no-site-packages env

The last line will create a virtualenv in the folder env.

Clone this project

$ git clone git://

Activate the virtualenv

From now on, each time you want to work with this virtualenv, you activate it with this command

$ source env/bin/activate

And you can deactivate it at a later time with

$ deactivate

When a virtualenv is activated you should have the name of the virtualenv in your prompt. E.g.: (env)$

Install the project dependencies

(env)$ cd cody
(env)$ python develop

This will install all the dependencies listed in the project in your virtualenv. That's about it for the code.


I use Chrome most of the time, but you need Firefox for Selenium IDE. Update your version of Firefox to the latest.

Selenium IDE

With Firefox, go to and download the latest version of Selenium IDE.


We will make some JavaScript tests with qunit. Clone the repo somewhere on your computer with:

git clone git://