One of the biggest challenges in writing test automation scripts comes in keeping pace with the rapid changes of the application under test. One small “critical” change made by a dev at midnight can result in hours of painful investigation and test script repair for you the next morning(s).
However, if you factor your tests properly you can write complex, reliable tests with only a few lines of code that not only test themselves using reflection, but also can be repaired in no time, and repurposed for other platforms. By factoring our Selenium tests into scripts(test cases), a model (with hooks to WebElements), and libraries of user actions (e.g. flirt with this user, register, send a message, etc.) Zoosk can quickly write and repair tests for our rapidly-changing and frequently experimental site. The Selenium model and library can even be swapped out for libraries that drive other devices (e.g. iPhone/iPad) and use the same scripts to test our mobile apps independently or simultaneously in conjunction with our selenium-automated website / Facebook app.
Video producer: http://www.seleniumconf.org/