Configuration
The *.env
file provides additional configuration for the framework.
To run the framework on your Adobe Commerce or Magento Open Source instance, specify the basic configuration values.
Advanced users can create custom configurations based on requirements and environment.
Basic configuration
These basic configuration values are required and must be set by the user before the framework can function correctly.
MAGENTO_BASE_URL
The root URL of the application under test.
Example:
Copied to your clipboardMAGENTO_BASE_URL=http://magento2.vagrant251
If the MAGENTO_BASE_URL
contains a subdirectory (like http://magento.test/magento2ce
), specify MAGENTO_CLI_COMMAND_PATH
.
MAGENTO_BACKEND_NAME
The path to the Admin page.
Example:
Copied to your clipboardMAGENTO_BACKEND_NAME=admin_12346
MAGENTO_BACKEND_BASE_URL
(Optional) If you are running the Admin Panel on a separate domain, specify this value:
Example:
Copied to your clipboardMAGENTO_BACKEND_BASE_URL=https://admin.magento2.test
MAGENTO_ADMIN_USERNAME
The username that tests can use to access the Admin page
Example:
Copied to your clipboardMAGENTO_ADMIN_USERNAME=admin
MAGENTO_ADMIN_PASSWORD
The password that tests will use to log in to the Admin page.
Example:
Copied to your clipboardMAGENTO_ADMIN_PASSWORD=1234reTyt%$7
Advanced configuration
Depending on the environment you use, you may need to configure the Functional Testing Framework more precisely by setting additional configuration parameters. This section describes available configuration parameters and their default values (where applicable).
DEFAULT_TIMEZONE
Sets a default value for the timezone
attribute of a generateDate
action.
This value is applied when a test step does not specify a time zone.
For the complete list of available time zones, refer to List of Supported Timezones.
Default: America/Los_Angeles
.
Example:
Copied to your clipboardDEFAULT_TIMEZONE=UTC
SELENIUM
The SELENIUM_*
values form the URL of a custom Selenium server for running testing.
Default Selenium URL: http://127.0.0.1:4444/wd/hub
And the default configuration:
Copied to your clipboardSELENIUM_HOST=127.0.0.1SELENIUM_PORT=4444SELENIUM_PROTOCOL=httpSELENIUM_PATH=/wd/hub
SELENIUM_*
values are required if you are running Selenium on an external system.
If you change the configuration of the external Selenium server, you must update these values.
SELENIUM_HOST
Override the default Selenium server host.
Example:
Copied to your clipboardSELENIUM_HOST=user:pass@ondemand.saucelabs.com
SELENIUM_PORT
Override the default Selenium server port.
Example:
Copied to your clipboardSELENIUM_PORT=443
SELENIUM_PROTOCOL
Override the default Selenium server protocol.
Example:
Copied to your clipboardSELENIUM_PROTOCOL=https
SELENIUM_PATH
Override the default Selenium server path.
Example:
Copied to your clipboardSELENIUM_PATH=/wd/hub
MAGENTO_RESTAPI
These MAGENTO_RESTAPI_*
values are optional and can be used in cases when your Adobe Commerce or Magento Open Source instance has a different API path than the one in MAGENTO_BASE_URL
.
Copied to your clipboardMAGENTO_RESTAPI_SERVER_HOSTMAGENTO_RESTAPI_SERVER_PORT
MAGENTO_RESTAPI_SERVER_HOST
The protocol and the host of the REST API server path.
Example:
Copied to your clipboardMAGENTO_RESTAPI_SERVER_HOST=http://localhost
MAGENTO_RESTAPI_SERVER_PORT
The port part of the API path.
Example:
Copied to your clipboardMAGENTO_RESTAPI_SERVER_PORT=5000
*_BP
Settings to override base paths for the framework. You can use it when the Functional Testing Framework is applied as a separate tool. For example, when you need to place the Functional Testing Framework and the Adobe Commerce or Magento Open Source codebase in separate projects.
Copied to your clipboardMAGENTO_BPTESTS_BPFW_BPTESTS_MODULES_PATH
MAGENTO_BP
The path to a local Adobe Commerce or Magento Open Source codebase.
It enables the bin/mftf
commands such as run
and generate
to parse all modules of the Adobe Commerce or Magento Open Source codebase for tests.
Copied to your clipboardMAGENTO_BP=~/magento2/
TESTS_BP
BP is an acronym for Base Path. The path to where the Functional Testing Framework supplementary files are located in the Adobe Commerce or Magento Open Source codebase.
Example:
Copied to your clipboardTESTS_BP=~/magento2ce/dev/tests/acceptance
FW_BP
The path to the Functional Testing Framework. FWBP is an acronym for _FrameWork Base Path.
Example:
Copied to your clipboardFW_BP=~/magento/magento2-functional-testing-framework
TESTS_MODULE_PATH
The path to where the Functional Testing Framework modules mirror Adobe Commerce or Magento Open Source modules.
Example:
Copied to your clipboardTESTS_MODULE_PATH=~/magento2/dev/tests/acceptance/tests/functional/Magento
MODULE_ALLOWLIST
Use for a new module.
When adding a new directory at tests/functional/Magento
, add the directory name to MODULE_ALLOWLIST
to enable the Functional Testing Framework to process it.
Example:
Copied to your clipboardMODULE_ALLOWLIST=Magento_Framework,Magento_ConfigurableProductWishlist,Magento_ConfigurableProductCatalogSearch
MAGENTO_CLI_COMMAND_PATH
Path to the CLI command entry point.
Default: dev/tests/acceptance/utils/command.php
.
It points to MAGENTO_BASE_URL
+ dev/tests/acceptance/utils/command.php
Modify the default value:
- for non-default Adobe Commerce or Magento Open Source installation
- when using a subdirectory in the
MAGENTO_BASE_URL
Example: dev/tests/acceptance/utils/command.php
BROWSER
Override the default browser performing the tests.
Default: Chrome
Example:
Copied to your clipboardBROWSER=firefox
CREDENTIAL_VAULT_ADDRESS
The API address for a vault server.
Default: http://127.0.0.1:8200
Example:
Copied to your clipboard# Default api address for local vault dev serverCREDENTIAL_VAULT_ADDRESS=http://127.0.0.1:8200
CREDENTIAL_VAULT_SECRET_BASE_PATH
Vault secret engine base path.
Default: secret
Example:
Copied to your clipboard# Default base path for kv secret engine in local vault dev serverCREDENTIAL_VAULT_SECRET_BASE_PATH=secret
CREDENTIAL_AWS_SECRETS_MANAGER_REGION
The region that AWS Secrets Manager is located.
Example:
Copied to your clipboard# Region of AWS Secrets ManagerCREDENTIAL_AWS_SECRETS_MANAGER_REGION=us-east-1
CREDENTIAL_AWS_SECRETS_MANAGER_PROFILE
The profile used to connect to AWS Secrets Manager.
Example:
Copied to your clipboard# Profile used to connect to AWS Secrets Manager.CREDENTIAL_AWS_SECRETS_MANAGER_PROFILE=default
VERBOSE_ARTIFACTS
Determines if passed tests should still have all their Allure artifacts. These artifacts include .txt
attachments for dontSee
actions and createData
actions.
If enabled, all tests will have all of their normal Allure artifacts.
If disabled, passed tests will have their Allure artifacts trimmed. Failed tests will still contain all their artifacts.
This is set false
by default.
Copied to your clipboardVERBOSE_ARTIFACTS=true
ENABLE_BROWSER_LOG
Enables addition of browser logs to Allure steps
Copied to your clipboardENABLE_BROWSER_LOG=true
SELENIUM_CLOSE_ALL_SESSIONS
Forces the Functional Testing Framework to close all Selenium sessions after running a suite.
Use this if you're having issues with sessions hanging in a Functional Testing Framework suite.
Copied to your clipboardSELENIUM_CLOSE_ALL_SESSIONS=true
BROWSER_LOG_BLOCKLIST
Blocklists types of browser log entries from appearing in Allure steps.
Denoted in browser log entry as "SOURCE": "type"
.
Copied to your clipboardBROWSER_LOG_BLOCKLIST=other,console-api
WAIT_TIMEOUT
Global Functional Testing Framework configuration for the default amount of time (in seconds) that a test will wait while loading a page.
Copied to your clipboardWAIT_TIMEOUT=30
ENABLE_PAUSE
Enables the ability to pause test execution at any point, and enter an interactive shell where you can try commands in action. When pause is enabled, the Functional Testing Framework will generate pause() command in _failed() hook so that test will pause execution when failed.
Copied to your clipboardENABLE_PAUSE=true
REMOTE_STORAGE_AWSS3_DRIVER
The remote storage driver. To enable AWS S3, use aws-s3
.
Example:
Copied to your clipboardREMOTE_STORAGE_AWSS3_DRIVER=aws-s3
REMOTE_STORAGE_AWSS3_REGION
The region of S3 bucket.
Example:
Copied to your clipboardREMOTE_STORAGE_AWSS3_REGION=us-west-2
REMOTE_STORAGE_AWSS3_BUCKET
The name of S3 bucket.
Example:
Copied to your clipboardREMOTE_STORAGE_AWSS3_BUCKET=my-test-bucket
REMOTE_STORAGE_AWSS3_PREFIX
The optional prefix inside S3 bucket.
Example:
Copied to your clipboardREMOTE_STORAGE_AWSS3_PREFIX=local
REMOTE_STORAGE_AWSS3_ACCESS_KEY
The optional access key for the S3 bucket.
Example:
Copied to your clipboardREMOTE_STORAGE_AWSS3_ACCESS_KEY=access-key
REMOTE_STORAGE_AWSS3_SECRET_KEY
The optional secret key for the S3 bucket.
Example:
Copied to your clipboardREMOTE_STORAGE_AWSS3_SECRET_KEY=secret-key
MAGENTO_ADMIN_WEBAPI_TOKEN_LIFETIME
The lifetime (in seconds) of the Admin WebAPI token; if token is older than this value a refresh attempt will be made just before the next WebAPI call.
Example:
Copied to your clipboardMAGENTO_ADMIN_WEBAPI_TOKEN_LIFETIME=10800