1.2 KiB
1.2 KiB
Unit tests
Unit tests can be performed by running phpunit in the root directory or inside /tests/unit.
Functional tests
Functional tests can be performed by running phpunit in the /tests/functional directory. Ensure the following configuration is met:
- Active theme is
demo - Language preference is
en
Selenium set up
- Download latest Java SE from http://java.sun.com/ and install
- Download a distribution archive of Selenium Server.
- Unzip the distribution archive and copy selenium-server-standalone-2.42.2.jar (check the version suffix) to /usr/local/bin, for instance.
- Start the Selenium Server server by running
java -jar /usr/local/bin/selenium-server-standalone-2.42.2.jar.
Selenium configuration
Create a new file selenium.php in the root directory, add the following content:
<?php
// Selenium server details
define('TEST_SELENIUM_HOST', '127.0.0.1');
define('TEST_SELENIUM_PORT', 4444);
define('TEST_SELENIUM_URL', 'http://localhost/backend/');
define('TEST_SELENIUM_BROWSER', '*firefox');
// OctoberCMS details
define('TEST_SELENIUM_THEME', 'demo');
define('TEST_SELENIUM_USER', 'admin');
define('TEST_SELENIUM_PASS', 'admin');