Writing System Tests for Joomla! - Part 1

From Joomla! Documentation

Quill icon.png
Page Actively Being Edited!

This article is actively undergoing a major edit for a short while.
As a courtesy, please do not edit this page while this message is displayed. The user who added this notice will be listed in the page history. This message is intended to help reduce edit conflicts; please remove it between editing sessions to allow others to edit the page. If this page has not been edited for several hours, please remove this template, or replace it with {{underconstruction}} or {{incomplete}}.

As reported at Running Automated Tests for Version 1.6, Joomla! version 1.6 now includes a library of function tests. This document details the steps necessary to create functional tests using Selenium.

NOTE: This article assumes that you have read the aforementioned article and have PHPUnit and Selenium set up and working properly.

Creating a basic functional test[edit]

Note: It's recommended to update your local copy of 1.6 to the latest build before writing any tests.

In this test, we are going to test some of the menu items on the home page.

1. Open 1.6 in FireFox and navigate to the home page.

2. Open Selenium IDE by going to the Tools menu and select Selenium IDE. Selenium will start recording automatically and the record button will appear highligted.

3. Verify that the Base URL displayed in Selenium is that of your test site.

4. Perform the basic test by selecting the menu items to test with your mouse.

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

Selenium-screen.png