phpmyadmin/test
Michal Čihař 4fc04f3938 Adjust tests to new setup handling of messages
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-12-13 10:39:02 +01:00
..
classes Do not try to run gd based tests if gd extension is not there 2016-12-06 10:44:06 +01:00
libraries Adjust tests to new setup handling of messages 2016-12-13 10:39:02 +01:00
selenium Use example.com for sample test urls 2016-07-28 09:12:01 +02:00
test_data Use https to access phpmyadmin.net 2016-07-27 16:29:08 +02:00
.htaccess Use https when available 2016-08-17 13:17:41 +02:00
AllSeleniumTests.php Remove unneeded closing tags. 2015-07-19 00:18:38 +03:00
bootstrap-dist.php Use vendor specific path when loading gettext in tests 2016-12-06 09:48:02 +01:00
Environment_test.php Minimum supported PHP version is now 5.5 2015-08-21 07:55:16 -04:00
install-browserstack Avoid running shell scripts as CGI 2016-12-08 11:41:42 +01:00
install-runkit There is no runkit for 7.1 2016-12-13 08:29:40 +01:00
php-noprofile.ini Improve Travis setup 2016-01-25 09:01:48 +01:00
php-runkit.ini Do not load runkit extension twice in tests 2016-01-25 09:47:49 +01:00
PMATestCase.php Introduce base test case. Reset configuration values to defaults for each test case 2015-12-17 19:22:10 +11:00
README.rst Use https for outbound links where applicable 2016-07-28 09:19:13 +02:00
start-local-server Avoid running shell scripts as CGI 2016-12-08 11:41:42 +01:00
theme.php Simplify code 2016-01-12 14:50:13 +01:00
wui.php Remove unneeded closing tags. 2015-07-19 00:18:38 +03:00

PhpMyAdmin test suite
=====================

This directory is protected from web visitors by a .htaccess file.

For more information on allowing http access to this directory see:
https://httpd.apache.org/docs/current/mod/mod_authz_host.html#allow

Please visit the wiki for more information on unit testing:
https://wiki.phpmyadmin.net/pma/UnitTesting

Selenium tests
--------------

To be able to run Selenium tests, you need to have webserver, database
and Selenium running. Following environment variables configure where
testsuite connects:

TESTSUITE_SERVER
    Database server to use.
TESTSUITE_USER
    Username for connecting to database.
TESTSUITE_PASSWORD
    Password for connecting to database.
TESTSUITE_DATABASE
    Database to use for testing.
TESTSUITE_URL
    URL where tested phpMyAdmin is available.

Additionally you need to configure link to Selenium and browsers. You
can either setup Selenium locally or use BrowserStack automated testing.

For local setup, define following:

TESTSUITE_SELENIUM_HOST
    Host where Selenium is running.
TESTSUITE_SELENIUM_PORT
    Port where to connect.
TESTSUITE_SELENIUM_BROWSER
    Browser to use for testing inside Selenium.

With BrowserStack, set following:

TESTSUITE_BROWSERSTACK_UNAME
    BrowserStack username.
TESTSUITE_BROWSERSTACK_KEY
    BrowserStack access key.

For example you can use following setup in ``phpunit.xml``::

    <php>
        <env name="TESTSUITE_SERVER" value="localhost"/>
        <env name="TESTSUITE_USER" value="root"/>
        <env name="TESTSUITE_PASSWORD" value="root"/>
        <env name="TESTSUITE_DATABASE" value="test"/>
        <env name="TESTSUITE_PHPMYADMIN_HOST" value="http://localhost/phpmyadmin/" />
        <env name="TESTSUITE_SELENIUM_HOST" value="127.0.0.1" />
        <env name="TESTSUITE_SELENIUM_PORT" value="4444" />
    </php>