This Short Cut is an introduction to building automated web tests using two tools, twill and Selenium.
Chapter 1. Introduction
Section 1.1. What Don't We Cover?
Section 1.2. What Are twill and Selenium? And Why Not...
Section 1.3. Contacting the authors
Section 1.4. Acknowledgements
Chapter 2. Functional Web Testing with twill
Section 2.1. A brief history of twill
Section 2.2. What Is twill?
Section 2.3. Introducing twill
Section 2.4. More Advanced twill Features
Section 2.5. twill Extensions
Section 2.6. Using twill from Python
Section 2.7. Extending twill Yourself
Chapter 3. Functional Web Testing with Selenium
Section 3.1. A Brief History of Selenium
Section 3.2. Introducing Selenium Core
Section 3.3. Building a Selenium Test Suite
Chapter 4. Testing a Simple Web Application with twill and Selenium
Section 4.1. The Django "poll" Application
Section 4.2. The First Step: Charting a Path to Test
Section 4.3. The Second Step: Building a Test Script
Section 4.4. The Third Step: Controlling the Application Environment
Section 4.5. Integrating Fixtures and Tests with unittest
Section 4.6. The admin Interface
Section 4.7. Recording Some Simple Selenium Tests
Section 4.8. Adding a Test Condition to the Script
Section 4.9. Concluding Remarks
This Short Cut is an introduction to building automated web tests using two tools, twill and Selenium. twill is a simple web scripting language that can be used to automate web tests, while Selenium is a web testing framework that runs in any browser and can be used to test complex web sites that make extensive use of JavaScript.
The best way to use this Short Cut is to run through the examples. We expect that within an hour you can start writing your own functional tests in either twill or Selenium, and within a day you will understand most, if not all, of the possibilities and the limitations of these tools.
This book is divided into three parts. First we introduce twill and show how you can browse the Web and test basic web applications with twill. Next we introduce Selenium and discuss using Selenium to test sites that use JavaScript and Ajax technologies. Finally, we build some tests for a simple Django application using both twill and Selenium, and show how to integrate these tests into your development.