Quick start. Prepare Magento application
Change WYSIWYG settings
A Selenium web-driver cannot enter data to fields with WYSIWYG. This option disables the WYSIWYG and enables the web-driver to process these fields as simple text areas.
- Log in to the Magento Admin as an administrator.
- Follow Stores > Configuration > General > Content Management > WYSIWYG Options.
- Set Enable WYSIWYG Editor to Disabled Completely.
- Click Save Config.
Change security settings
Enable the Admin Account Sharing setting to avoid unpredictable logout during testing session. And disable the Add Secret Key in URLs setting to open pages using direct URLs.
- Follow Stores > Configuration > Advanced > Admin > Security.
- Set Admin Account Sharing to Yes.
- Set Add Secret Key to URLs to No.
Refresh page cache
- Go to Cache Management.
- Select the checkboxes next to Configuration and Page Cache.
- From the Actions list in the upper left, click Refresh.
- Click Submit.
Enable CLI commands
Functional tests require access to utilities working with Magento during test run. Depending on a web server, use the following instructions to enable access to the commands.
Apache
Copy /dev/tests/functional/.htaccess.sample
to /dev/tests/functional/.htaccess
.
NGINX
In nginx.conf
, add declaration blocks for each command listed in /dev/tests/functional/.htaccess.sample
using the following example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
location ~* ^/dev/tests/functional/utils($|/) {
root $MAGE_ROOT;
location ~ ^/dev/tests/functional/utils/command.php {
fastcgi_pass fastcgi_backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~* ^/dev/tests/functional/utils($|/) {
root $MAGE_ROOT;
location ~ ^/dev/tests/functional/utils/website.php {
fastcgi_pass fastcgi_backend;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
<< Adjust configuration | Prepare environment for test run >> |