Translated using Weblate (Russian)
[phpmyadmin.git] / test / README.rst
blobdadbf37aa422950674e95b47814a04cf5de4a281
1 PhpMyAdmin test suite
2 =====================
4 This directory is protected from web visitors by a .htaccess file.
6 For more information on allowing http access to this directory see:
7 http://httpd.apache.org/docs/current/mod/mod_authz_host.html#allow
9 Please visit the wiki for more information on unit testing:
10 https://wiki.phpmyadmin.net/pma/UnitTesting
12 Selenium tests
13 --------------
15 To be able to run Selenium tests, you need to have webserver, database
16 and Selenium running. Following environment variables configure where
17 testsuite connects:
19 TESTSUITE_SERVER
20     Database server to use.
21 TESTSUITE_USER
22     Username for connecting to database.
23 TESTSUITE_PASSWORD
24     Password for connecting to database.
25 TESTSUITE_DATABASE
26     Database to use for testing.
27 TESTSUITE_URL
28     URL where tested phpMyAdmin is available.
30 Additionally you need to configure link to Selenium and browsers. You
31 can either setup Selenium locally or use BrowserStack automated testing.
33 For local setup, define following:
35 TESTSUITE_SELENIUM_HOST
36     Host where Selenium is running.
37 TESTSUITE_SELENIUM_PORT
38     Port where to connect.
39 TESTSUITE_SELENIUM_BROWSER
40     Browser to use for testing inside Selenium.
42 With BrowserStack, set following:
44 TESTSUITE_BROWSERSTACK_UNAME
45     BrowserStack username.
46 TESTSUITE_BROWSERSTACK_KEY
47     BrowserStack access key.
49 For example you can use following setup in ``phpunit.xml``::
51     <php>
52         <env name="TESTSUITE_SERVER" value="localhost"/>
53         <env name="TESTSUITE_USER" value="root"/>
54         <env name="TESTSUITE_PASSWORD" value="root"/>
55         <env name="TESTSUITE_DATABASE" value="test"/>
56         <env name="TESTSUITE_PHPMYADMIN_HOST" value="http://localhost/phpmyadmin/" />
57         <env name="TESTSUITE_SELENIUM_HOST" value="127.0.0.1" />
58         <env name="TESTSUITE_SELENIUM_PORT" value="4444" />
59     </php>