• Testing Suite for web applications

    I caught a reference to Selenium from a notice on a new Refcardz from DZone.   The idea of implementing automated tests for web applicatons I’m building has been with me for a  while now.  The Ruby on Rails framework incorporates a testing suite, and it is really handy.  The idea with automated testing comes in handy as you make changes.  Without automated tests you need to remember to re-test existing functionality after updates.  And as the application becomes more complex, re-testing after every update get boring, and ends up not happening.  Which can lead to unpleasant surprises.  This concept is useful even when working on something as simple as a WordPress theme.

    Actually WordPress themes are not all that simple.  In a typical theme you can end up with 6 – 12 different files, such as the archive, search, category, head, footer, sidebar templates.  And the more interlinked you have these the more likely a simple change on one will lead to breaking some piece of your site.  But to fully test you need to remember to open a sample page for each of the templates.  This is a perfect place for an automated test suite.

    In designing tests you want to make them granular.  For instance one test would insure the home page loads.  A second would enter a search and confirm that results are returned.  A third would load a single post page and confirm.  Etc.  By making them small and single function it is easier to pinpoint problems when they arise.  And with Selenium creating these tests is as simple as hitting the record button and manually performing the desired task.

    Trust me — if you are creating a complex WordPress site, editing an existing theme or creating your own theme, this will save you a lot of time.  For you programmers out there Selenium will output the tests to PHP, Java, Ruby, and other languages allowing further editing and the addition of conditional statements and other programming goodies.  You can even test in multiple browsers or set up automated load testing.  But don’t let these features scare you beginners away — it is easy to get up and rolling.

    Selenium web application testing system

    Selenium IDE is a Firefox add-on that records clicks, typing, and other actions to make a test, which you can play back in the browser.

    Getting Started with Selenium | Refcardz

    Selenium is a portable software testing framework for Web applications. Selenium works well for QA testers needing record/playback authoring of tests and for software developers needing to author tests in Java, Ruby, Python, PHP, and several other languages using the Selenium API. This DZone Refcard starts with how to install Selenium and then moves on to cover working with TinyMCE, Ajax Objects, Reporting options and even the Future of Selenium.

    Selenium (software) – Wikipedia, the free encyclopedia

    Selenium was developed by a team of programmers and testers at ThoughtWorks. It is open source software,

    Related Posts

    Tags: , , , , , , ,
  • Author: Randy

    In my day job I serve as Information Technology Director for the Yale School of Drama. Otherwise I garden, play guitar, build stuff out of wood, take photos, play around with technology and have been blogging since 2003.

    Share on: LinkedIn

    Stay Informed!

    Did you enjoy this post? Then subscribe to my email newsletter and have the daily posts delivered directly to your inbox. Enter your email address here:

    ADD YOUR COMMENT
    Comments are moderated.

Welcome to RodeWorks

Randall Rode's online home for thoughts, notes, and experiments with a wide range of technology topics. Visit the about page for info on my recent projects and professional background. I welcome your comments!

  • Recent Comments

  • Coming Soon

    Open Source Way in creating community

    March 17, 2010

    Drupal 7 promises big UX improvements

    March 17, 2010

    Site Topics