Extension:Selenium

Selenium is an extension which provides a tag which can encapsulate any selenium tests for example, tests generated using selenium-ide (an extension available for the Firefox web browser). This allows mediawiki to act as a repository for maintaining selenium tests in articles. A wiki article that is a single selenium test is distinctly different from an article which contains a suite of selenium tests separated by section headings ( ==Section 1== etc).

This extension comes bundled with selenium-core (version 0.8.3), a test tool for web applications. The extension rovides a special page (Special:Selenium) as an interface to allow a suite of selenium tests provided within an article to be parsed and run with selenium-core on the same server. When an article contains a selenium tag, it is automatically categorized into Category:Selenium. The Special page Special:Selenium provides a drop down list of selenium test suites to run using selenium-core.

This allows client side testing and validation of content on the server that the extension is installed on. For example, selenium-ide tests could be written to prove that a certain extension has been installed by checking for extension credits in Special:Version, and generate some content in the Sandbox that illustrates functionality and checks returned output for certain expected criteria. The Selenium-core environment will determine which tests have passed or failed.

Installation
Download the file Selenium.zip and unpack it in;

The structure should be as follows;

To enable the extension add the following line into your LocalSettings.php.

Check the extension is installed at Special:Version on your wiki site.

Alternatively you can separately download selenium-core-0 and the Extension file Selenium.php and recreate the directory structure above.

Usage
The tag encapsulates an entire generated selenium-ide test without having to remove any of the generated tag content. Adding the following CSS code to MediaWiki:Common.css will configure the displayed tables to look like selenium tests within wiki articles

Known issues

 * Parameters are not expanded in transcluded articles.
 * If tags encapsulate multiple tests within a single section heading, only the first selenium tags within section headings are used to generate a suite used by the special page.
 * Currently there is no logging of users who run a selenium-core suite from a wiki article.