Functional Testing Framework Configuration

The Functional Testing Framework configuration settings are located in two XML files:

  • phpunit.xml
  • config.xml


The <magento2_root_dir>/dev/tests/functional/phpunit.xml contains PHPUnit configuration settings. Blocks of settings are described in the PHPUnit documentation, except <php>, which contains parameters described in the following table. See the default phpunit.xml code at dev/tests/functional/phpunit.xml.dist.

Parameter Description value Usage
app_frontend_url URL to Magento storefront under test. http://<name>.<domain>/ Set URL for Magento storefront under test
app_backend_url URL to Magento Admin under test. "http://<name>.<domain>/<path to Admin>/" Set URL for Magento Admin URL under test
testsuite_rule Test suite name to be run. "<test suite name>" Set a test suite
testsuite_rule_path Path to a test suite. "<path to test suite>" Set a path to test suite
log_directory Path to a directory with testing reports. "<path to the reporting directory>" Set a reporting directory
events_preset Name of a reporting event preset. "<event preset name>" Set a preset
module_whitelist List of special FTF modules which are present in functional tests but are not enabled in the Magento application. "<names of modules>" Make listed modules (that are not enabled in Magento) visible for the FTF.
basedir A directory where PHPUnit reports are stored. "<directory for PHPUnit reports>"  
credentials_file_path Path to the file with credentials required by services such as payment and shipment. "./credentials.xml.dist" Edit credentials.xml to work with Magento modules that require credentials
mage_mode Magento mode (About Magento modes). "default", "developer", "production" This parameter is intended to be used directly in a test. The FTF doesn’t use it. Open an example
module_filter Applicable for test suites only. Enables you to select test cases for specific modules. Learn more about the <module> filter in a test suite. "Magento_<name_of_module>" Use it when you don’t want to modify the test suite.
module_filter_strict Applicable for a tests suite only. It has the same effect as strict in the <module>. Learn more about strict parameter of the <module> filter in a test suite. "1", "0" Use it when you don’t want to modify the test suite.


The FTF configuration settings are declared and specified in two places:

In the Framework:

The file is located in <magento2_root_dir>/dev/tests/functional/vendor/magento/mtf/etc. See the default configuration at etc/config.xml.dist.


Figure 1. - XML Schema for the <magento2_root_dir>/dev/tests/functional/vendor/magento/mtf/etc/config.xml.

In Magento functional tests:

The file is located in <magento2_root_dir>/dev/tests/functional/. The default configuration is in dev/tests/functional/etc/config.xml.dist.


Figure 2. - XML Schema for the <magento2_root_dir>/dev/tests/functional/vendor/magento/mtf/etc/config.xml.

The FTF merges settings from both files with the following priority:

  • config.xml in Magento has higher priority then config.xml in the Framework
  • config.xml.dist is omitted if config.xml exists

Settings are grouped into the following blocks:


Description: Application configuration settings.

Parameter Description
<reopenBrowser> Determines that a browser is to be restarted after each test or testCase.
<backendLogin> Magento Admin username that is used during functional testing.
<backendPassword> Magento Admin password that is used during functional testing.
<appBackendUrl> Base URL of the Magento Admin. Not applicable currently.
<backendLoginUrl> Relative path to the Magento Admin login page.


Learn about isolation management

Description: Settings of a script to be run during functional testing.

Parameter Description Values
<resetUrlPath> Relative path of a script to be run. The URL is opened as usual web page in a browser, so that corresponding permissions must be set to the file. <resetUrlPath>dev/tests/mtf/isolation.php</resetUrlPath>
<testSuite> When the script must be called relatively to test suite run. none, before, after, both
<testCase> When the script must be called relatively to test case run. none, before, after, both
<test> When the script must be called relatively to test run. none, before, after, both

Values description:

  • none - never run
  • before - run before the entity to which it concerns
  • after - run after the entity to which it concerns
  • both - run before and after the entity to which it concerns


Open settings declarations in Selenium repository

Description: Selenium server settings.

Parameter Description Values
name Name of an item. "selenium"
type Required Selenium setting. The FTF doesn’t use it. "default"
browser A browser full name to be displayed where you needed it. The FTF doesn’t use it.  
browserName A browser that can be used for functional testing. android, chrome, firefox, htmlunit, internet explorer, iPhone, iPad, opera, safari
host and port Address of a Selenium Server.  
seleniumServerRequestsTimeout A specified period of time to process a request.  
sessionStrategy Standard Selenium Server parameter that sets a session strategy. Recommended to use "shared" only. "shared", "isolated"


Learn about desiredCapabilities in Selenium official documentation.


Specifies priorities for different types of handlers. The lower the value, the higher the priority. The highest priority has value 0. token contains access token (used by WebAPI handlers only). Learn more about handlers.

Parameter Description Values
<webapi> priority value of a WebAPI handler. Integer
<curl> priority value of a curl handler priority. Integer
<ui> priority value of a UI handler priority. Integer


Set of parameters to be used for installation test case.

Parameter Description
<host> Magento database hostname or IP address.
<user> Magento database username.
<password> Magento database user password.
<dbName> Name of a database.
<baseUrl> Magento application base URL, starting with the scheme (http:// or https://) and ending with a slash character (/).
<backendName> Admin URI (following the base URL).

Learn more about installation parameters