=== Presentation title ===
"Agile Web Development and Testing"
=== Author names and contact info ===
Grig Gheorghiu
Email: grig at gheorghiu.net
Web site: agiletesting.blogspot.com
C. Titus Brown
Email: titus at caltech.edu
Web site: www.advogato.org/person/titus
=== Topic ===
We will present a Python Web application that we developed together as an "agile team", using agile development and testing approaches, techniques and tools. The value of the tutorial will consist on one hand in detailing the agile development and testing methods and techniques
we used, and on the other hand in demonstrating specific tools that we used for our development and testing. The main focus of our tutorial will be on automated testing techniques.
The tutorial will cover:
* unit testing and code coverage
* functional/acceptance testing
* Web application testing
* continuous integration and automated smoke testing
* "agile documentation", i.e. using tests as documentation
* issue tracking and agile project management (user stories, tracking iteration and project velocity, burndown charts)
The specific application we will present is a personal mail search and annotation engine that is deployed as a Web application. Users can retrieve mailboxes via the local file system, POP, IMAP or HTTP, then they can browse, search and annotate (i.e. interactively comment on) specific messages.
Although the application was programmed in Python, the techniques and tools we used are in their vast majority applicable to applications written in any programming language.
=== Audience ===
The tutorial is aimed at developers and testers interested in techniques and tools that can help them increase their agility and their testing coverage. A familiarity with agile development concepts is useful, but not required, since will be going through some introductory
agile concepts at the start of the tutorial. Developers and testers of all levels of proficiency, from beginners to experienced practitioners, should find something to take away from the tutorial.
=== Duration ===
180 minutes
=== Benefits ===
The most important benefit that attendees will take away from the tutorial will be an exposure to development and testing tools that they will be able to use immediately in their own applications.
The main focus of the tutorial will consist in presenting tools and techniques for automated testing.
One of our goals in developing the application was to approach testing from as many angles as possible. As such, we will present the notion of "holistic testing", which means making sure that your tests cover all layers of the application:
* unit testing for individual methods/functions/classes
* functional/acceptance testing at the back-end/business logic layer (using Fit/FitNesse)
* functional/acceptance testing at the GUI layer (using twill and Selenium)
We will devote ample time in the tutorial to testing tools that are especially useful for Web applications. Examples of such tools are twill and Selenium. We will also demonstrate how to write acceptance tools at the business logic layer in FitNesse.
An important part of our tutorial will consist in "lessons learned" that we will mention throughout our presentation. Some examples:
* apply the "tracer bullet" development technique by putting together an end-to-end prototype of the application
* as you work through the prototype, enter all of the random thoughts about future features/stories into the tracker or into the milestones
* remote pair programming works really well; it's amazing how much difference a second brain and a second set of eyeballs make, both in keeping each of us accountable to the other, and in increasing the overall quality of the code
* a great way to learn or understand code written by somebody else is to write unit tests for it
* acceptance tests at the business logic/back-end layer (written for example in Fit/FitNesse) proves to be extremely resilient in the presence of code changes; acceptance tests at the GUI layer proves to be more fragile and needed frequent changes to keep up with changes in the UI
* it pays to revisit unit tests, maybe as part of writing "agile documentation" (i.e. using the unit tests themselves as documentation); you can find yourself discovering bugs that weren't caught by your initial unit tests
* a tool such as Trac proves to be very useful for an agile approach to development and testing. Trac
* a Wiki -- which allows easy editing/jotting down of ideas and encourages brainstorming
* a defect tracking system -- which simplifies keeping track of not only bugs, but also tasks and enhancements
* a source browser -- which makes it easy to see all the SVN changesets
* a roadmap -- where you define milestones that are tied into the tracker
* a timeline -- which is a constantly-updated, RSS-ified chronological image of all the important events that happened in the project: code checkins, ticket changes, wiki changes, milestones
* Trac can be used as an agile project management tool by defining:
* iterations as milestones
* user stories as tickets of type "enhancement"
* stories split into tasks, which are tickets of type "task"
* Trac offers a nice "tickets per milestone" view which allows you to see your progress in completing tasks/stories associated with a particular iteration/milestone
=== Content Outline ===
1.5 hours:
* Introduction, who we are, outline of agile approach & test types
* Application demo, architecture, design principles
* Agile project management and issue tracking with Trac
* Continuous integration, smoke testing
* Agile documentation
* Unit testing, code coverage analysis
* Behavior-based acceptance testing via logging with TextTest
BREAK
1.5 hours:
* Acceptance testing with FitNesse
* Automated Web browsing and functional testing with twill
* Web application GUI testing with Selenium (we will also
demonstrate testing Ajax-specific functionality)
* Wrap-up, summary, cheering, Q&A
=== Process or format ===
The vast majority of the tutorial will consist of a live demo of the application and of the tools we used in developing and testing it. We will also have some slides with introductory material on agile concepts and techniques, but the core of our presentation will be hands-on and interactive.
=== Presenter bio ===
Grig Gheorghiu
Grig Gheorghiu has worked for the last 13 years as a programmer, research lab manager, system/network/security architect, and most recently as a software test engineer. Grig is a member of the Agile Alliance and of the xpsocal user group.
Articles:
* Article on Selenium in Oct. 2005 issue of "Better Software" magazine
* Article on "Agile testing with Python test frameworks" in Agile Times e-zine, vol. 7
Talks/presentations:
* Southern California Code Camp 2006 presentation on "Agile testing with Python test frameworks"
* StarWest 2005 Lightning Talk on Web application testing with Selenium
* PyCon 2005 presentation on "Agile testing with Python test frameworks"
* PyCon 2005 Lightning Talk on FitNesse and Selenium
* Regular posting of articles/tutorials/howtos on personal blog
Open Source projects:
* Cheesecake (tool which computes quality index for Python packages)
* pyUnitPerf (port of Mike Clark's jUnitPerf "continuous performance unit testing" tool to Python)
C. Titus Brown
Articles:
* substantial record of scientific publications in Digital Life, climatology, bioinformatics, and biology;
* article on "Bioinformatics in Python" in PyZine.
Talks/presentations:
* PyCon 2002 presentation on PyWX
* Regular postings of articles/tutorials/howtos on personal blog
Software projects:
* Lead architect and developer on multiple OSS projects, including:
* Cartwheel and FamilyRelationsII (bioinformatics GUI/Web site/processing pipeline);
* twill (Web testing tool);
* paircomp and motility libraries for bioinformatics searches;
Both presenters are organizers of the Southern California Python Interest Group, aka SoCal Piggies, and they have given numerous presentations at the monthly group meetings. Please visit the group's home page
=== History of tutorial ===
A variant of this tutorial, with an increased focus on Python-specific techniques, will be presented at PyCon 2006, Dallas, on 02/23/06. The PyCon tutorial proposal proved to be very popular with the people registering for the conference. The organizers attracted a record registration of 41 participants before participation was cut off by PyCon.