For the past 6 months I've been lucky to be part of the development team for the newly launched Yoursphere.com
, a Drupal-powered social networking site which "provides one of the safest online destinations for youth ages 9 through 18 to interact*". To say that Yoursphere is the most customized Drupal site I've worked on would be quite an understatement. One example of that, and subject of this article, the user registration system went from the standard single page - to one which uses 4 unique user creation forms which are integrated within several possible 'registration flows'. The most complex of these involves two of the user creation forms, 8 total screens and third-party identity verification.
Besides being an opportunity to get to know hook_user
real well, at the end of creating this system we were left with a larger-than-normal nightmare of, "Wow, I wonder if my new small change just exploded the entire registration system for the site. Hmmmmmm."
Deciding on acceptance testing / Selenium
Faced with how to automate testing of these screens and use case, combined with limited time to implement the testing framework, a method of acceptance testing
) was opted for instead of unit testing
(e.g., using Simpletest) for several reasons (though perhaps in the future we'll have both unit and acceptance testing implemented):
Selenium in action
- Facilitate testing of the registration system by non-developers
- There are registration screens which involve third-party interaction/functionality which cannot be unit-tested by us
- Selenium opens the possibility of testing the registration system across multiple browsers
- Seeing a browser step through all the registration steps just like a real person would do (except more quickly) is just so cool and offers a unique piece of mind about the integrity of the registration system
When I last wrote about Selenium
, I was trying to find an easy way to get Selenium RC to work *easily*, meaning without having to install a PEAR extension and/or PEAR itself. After (much) more research I can report conclusively that there is no *easy* way to get Selenium RC working, which in all honestly puts it outside my scope of interest, as I'm sure it would for most of the Drupal community.