Introduction to the Functional Testing Framework

The Functional Testing Framework is a framework used to perform automated end-to-end functional testing on Adobe Commerce and Magento Open Source projects.

data-variant=info
data-slots=text
This documentation is for version 3.0 of the framework, which was released in conjunction with Adobe Commerce and Magento Open Source 2.4. It is a major update and introduces many new changes and fixes. You can find documentation for version 2.0 in the source code repository. See find your version if you are unsure about which version you are using.

Goals

The framework also focuses on the following:

Audience

Use cases

Output

Tests

The framework supports three different locations for storing the tests and test artifacts:

All tests and test data from these locations are merged in the order indicated in the preceding list.

Directories immediately following the preceding paths use the same format. Subdirectories under each category are supported.

<Path>
├── ActionGroup
│   └── ...
├── Data
│   └── ...
├── Metadata
│   └── ...
├── Page
│   └── ...
├── Section
│   └── ...
├── Suite
│   └── ...
└── Test
    └── ...

Find your framework version

There are two options to find the version of the framework you are using:

All of the command-line commands must be executed from the <magento_root> directory.

Functional Testing Framework CLI

vendor/bin/mftf --version

Composer CLI

composer show magento/magento2-functional-testing-framework

Contents of dev/tests/acceptance

tests
      _data                       // Additional files required for tests (pictures, CSV files for import/export)
      _output                     // The directory is generated during test run. It contains testing reports.
      _suite                      // Test suites.
      _bootstrap.php              // The script that executes essential initialization routines.
      functional.suite.dist.yml   // The Codeception functional test suite configuration (generated while running 'bin/mftf build:project')
utils                           // The test-running utilities.
.env.example                    // Example file for environment settings.
.credentials.example            // Example file for credentials to be used by the third-party integrations (generated while running 'bin/mftf build:project'; should be filled with the appropriate credentials in the corresponding sandboxes).
.gitignore                      // List of files ignored by git.
.htaccess.sample                // Access settings for the Apache web server to perform the Commerce CLI commands.
codeception.dist.yml            // Codeception configuration (generated while running 'bin/mftf build:project')

Functional Testing Framework on GitHub

Follow the project and contribute on GitHub.