• Selenium testing

last modified June 1, 2009 by ree

With the increasing use of javascript it get more important to assure that a site is working correctly in different browsers and OSes. With the Selenium
test suite we are able to do real browser testing, but we have only a few functional tests at this moment. Since the eggification of Plone it has gotten
even harder to run a test suite, because UI parts are spread over multiple packages.

Goals

There has to be an easy way to add functional tests to your package, which you can record using Selenium IDE. The plone buildout should have a test script that starts up your site and the selenium server and runs all tests that are provided by eggs in the stack. You should also be able to run the tests for a given package.

A buildbot needs to be configured to be able to run all tests on different platforms and browsers.

How

1. Each egg can provide selenium tests by adding a entry point named
   [seltest.registry].
   
   It provides:
     - the name of the package
     - the name of the application used for grouping tests
     - the path where to find the tests themselves
     - the layer to prepare a set of test data. In case of Plone, you want a prefab Data.fs, in Django you want something different

2. The seltest.registry package will fetch all tests by calling the entry point of each egg and construct the tests and layers. In the future we want
   to be able to select a number of tests to run in a control panel provided by seltest.wsgi (see 4).

3. With seltest.runselenium we will provide a set of scripts to execute the tests, either inside your development environment or any given website.

4. Allow running tests through a browser using wsgi

Results

The seltest.registry is working except that the paths to the tests are not correct. The seltest.runselenium is done but expect the correct paths. The buildbot is setup is the least amount of work.

Team members

  • Jean-Paul Ladage
  • Balazs Ree
  • Maik Roeder