O'Reilly logo

An Introduction to Testing Web Applications with twill and Selenium by Jason Huggins, Gheorghe Gheorghiu, C. Titus Brown

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Functional Web Testing with twill

A brief history of twill

(by C. Titus Brown)

I first began looking for a way to automate web testing in 2003. I had two unmanageably large web sites being used by hundreds of people, and my default testing strategy for them was to add new features, make them public, and wait for bug reports. This wasn't very satisfactory for either me or the users, needless to say!

Around that time, I ran across Cory Dodt's PBP, a web scripting language built on top of John J. Lee's mechanize package, which let Python "speak" HTTP and understand web pages. (John's mechanize package was a Python port of Perl's WWW::Mechanize, and PBP looked somewhat like Perl's WWW::Mechanize::Shell.) Unfortunately, at that time PBP was in its very early stages and didn't work very well on my web sites.

In late 2004, I decided to investigate PBP again, because I really needed to write some automated web tests. By then PBP had matured considerably, and it got me about 90 percent of the way to a web testing solution for my web sites. I started submitting patches to Cory to make it a 100 percent solution. Eventually, however, we realized that Cory was interested in taking PBP in a different direction. I'd also become disenchanted with PBP's architecture, which relied on the sprawling Twisted library for certain functions. (PBP was born as a way to write functional tests for twisted.web, so this inter-reliance wasn't surprising.)

I set out to rewrite PBP from scratch. My initial rewrite used ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required