1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-11-01 23:14:58 +03:00
Files
phpmyadmin/test
Michal Čihař 13a3fb0635 Revert "Temporarily deactivate these tests (almost always fail on ci.phpmyadmin.net)"
This reverts commit 9403921e4e.

We should really test those. In case the requests will fail, some other
solution should be found to actually execute this code.

Signed-off-by: Michal Čihař <michal@cihar.com>

Conflicts:
	test/classes/PMA_Config_test.php
	test/classes/PMA_Util_test.php
	test/libraries/PMA_SetupIndex_test.php
2015-06-22 15:14:48 +02:00
..
2015-04-28 18:16:17 +05:30
…
2015-04-07 15:19:46 +02:00
2015-04-07 09:05:48 +02: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: http://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>