2. Open Selenium IDE by going to the Tools menu and select Selenium IDE. Selenium will start recording automatically and the red record button will appear highlighted (see image below).

3. Verify that the Base URL displayed in Selenium, next to the record button, is that of your test site.

4. Perform the test by following the instructions described above (Note: there are some slight variations between the test described above and the one we performed. This is due to variation of 1.6 during the development process).

5. When you have completed your test, click the the red record button (see image below) to stop recording.

6. Once recording has stopped, create a new PHP file in Eclipse (or your favorite code editor) and copy / paste the code from Selenium IDE to there. The contents of the example test is:

1. The first step in integrating this test into tests/suite is to call SeleniumJoomlaTestCase.php so that we can utilize the Selenium Test Case Methods. To do this, we will replace the first portion of our code:

<?phprequire_once'PHPUnit/Extensions/SeleniumTestCase.php';

with the following code

<?phprequire_once'SeleniumJoomlaTestCase.php';

We can now start utilizing the Selenium Joomla Test Case Methods.

2. We will now extend a class into our SeleniumJoomlaTestCase to implement the client/server protocol to talk to Selenium RC as well as specialized assertion methods for web testing.

At this point, running the test would successfully launch a two browsers instances, one for Selenium Remote Control and one for test itself, but it would fail due to the lack of the password being recorded. Additionally, we want to be sure that none of the path information is hard coded in the test.

3. To improve our code, and achieve what we noted above, we would delete the function below:

Running System Tests

Joomla Core Selenium testcases

As of February 2010, the unit and system tests for version1.6 have been incorporated into the SVN trunk under a folder called "tests". More information about running the version 1.6 tests is available in the article Running Automated Tests for Version 1.6.

It is recommended that tests "undo" any changes made to the site. For example, if you create a new User Group for a test, or series of tests, be sure to delete the group before concluding your test or series of tests. This can be done as part of the test. Other tests may encounter issues if artifacts of other tests are present.

The test are written in PHP and we are using Selenium RC to execute them later. You will need to select the PHP Selenium RC Format in Selenium IDE. Go to Options -> Format -> PHP Selenium RC

require_once 'SeleniumJoomlaTestCase.php';? allows use to utilize the methods that belong to the Selenium Joomla Test Case class

class ControlPanelExample extends SeleniumJoomlaTestCase extends a class into our SeleniumJoomlaTestCase to implement the client/server protocol to talk to Selenium RC as well as specialized assertion methods for web testing.