Since the Scout Labs application began, we’ve maintained a rapid pace of development for new features. These new features make the application more powerful and usable, but only if they are bug-free. And since the nature of computer programming makes bugs inevitable, we have comprehensive tests to help us catch those bugs and correct them.
Once a new feature or change to an existing feature is completed and deployed to our staging environment, the next step is to write new test scripts to ensure the new functionality behaves as expected. All the older scripts are executed as well to regression test the existing features to make sure they are still functional.
In addition to the Java and Ruby on Rails tests, we do end-user testing. For this we use Selenium Remote Control, an open-source web app testing tool that works in multiple browsers and operating systems. It allows us to test multiple versions of browsers in different operating systems, including Internet Explorer 6 & 7, Firefox 2 & 3 on Windows XP, Windows Vista, Mac OSX Tiger, and Mac OSX Leopard. Selenium also supports Safari; we’ll be adding test environments with that browser soon.
When the Selenium Remote Control (SRC) server is running, it accepts commands from a script to automate browser actions. Anything from clicking a button or link to parsing the HTML on a page can be automated.
Using Selenium and a driver for Ruby, we have created a comprehensive test suite that simulates an end-user browsing the Scout Labs app (albeit at super speed). This way, we can test the functionality of the whole site, from simple to complex:
- Simple: when the app is used to send a blog post email, it should be sent immediately with the correct content.
- Complex: when a user creates a bookmark on a blog post, photo, video, twitter, or comment entry, that bookmark has the correct tags, the correct create date, can only be deleted by the author, and shows up in the correct places (on the entry detail page, on the search result page of the corresponding search, in the bookmark section, under the activity feed of the homepage, and in all other members of that workspace).
If the test suite finds a problem, major or minor, a developer fixes it and the test is rerun. Only when all tests have passed on all browsers in all operating systems is the new version promoted to the public site. This ensures we catch as many bugs as possible so you have a smoother experience in the application.
Of course, no test suite is perfect and Selenium can’t catch all the bugs. If something does break, you will see an error submission form; please fill it out and we will fix it as soon as we can!