Update the Magento Functional Testing Framework

[Find your version][] of the MFTF.

The latest Magento 2.3 release supports MFTF 2.3.13. The latest Magento 2.2 release supports MFTF 2.3.8.

Magento tests and the framework are stored in different repositories.

Magento tests are stored in the same repository as the Magento code base. When you pull changes in the Magento code, you’re potentially pulling corresponding tests as well.

The MFTF is installed separately as a dependency using Composer. When pulling the latest Magento code, update the corresponding Composer dependencies in the magento2 root directory. This ensures that the MFTF is up to date.

Update the MFTF from 2.3.x

To update the MFTF to the latest patch:

  1. Verify that the Magento WYSIWYG settings and Security settings are set appropriately.
  2. Check details about backward incompatible changes in the Changelog and update your new or customized tests.
  3. Get the latest framework version using Composer:

    1
    
    composer update
    
  4. Generate the updated tests:

    1
    
    vendor/bin/mftf generate:tests
    

Update the MFTF from 2.2

To update the MFTF from the previous minor version:

  1. When you update Magento, verify that the Magento WYSIWYG settings and Security settings are set appropriately.
  2. Starting at the magento2/ root directory remove the vendor/ directory:

    1
    
    rm -rf vendor/
    
  3. Get the latest framework version from the Composer dependencies:

    1
    
    composer install
    
  4. Run the upgrade:tests using the new command line tool:

    1
    
    vendor/bin/mftf upgrade:tests app
    
  5. If you are using Phpstorm, update the urn catalog:

    1
    
    vendor/bin/mftf generate:urn-catalog .idea/
    
  6. Update your own tests, including data, metadata, and so on, if they contain tags that are unsupported in the newer version.

    Check details about backward incompatible changes and review new MFTF release documentation in the Changelog.

  7. Generate newly pulled tests:

    1
    
    vendor/bin/mftf generate:tests