cancel
Showing results for 
Search instead for 
Did you mean: 

New MTF to MFTF Conversion Project

lkrell
New Contributor

All Magento core features (order placement, product creation, checkout, etc) are covered by automated functional tests. Magento Functional Testing Framework (MFTF) was introduced in order to allow engineers to write tests for the new functionality in very simple  sophisticated way. These functional tests are located under each module directory in an MFTF directory: app/code/Magento/<module_name>/Tests/Mftf.

 

Currently, Magento core has a significant amount of automated test coverage based on the outdated Magento Testing Framework (MTF). We are opening this project to the Community to help convert all valuable tests to the efficient MFTF and to eliminate the maintenance effort of outdated testing framework (MTF).

 

Project Name: Magento Functional Test Migration

Magento Lead: Alex Kolesnyk

GitHub | Project Board | Slack (self signup)

 

Project plans and objectives

 

We hope to convert all existing MTF tests to MFTF:

 

  • Convert all MTF based tests to be written using MFTF.
  • Distribute knowledge and best practices of Automated Functional Testing in Magento.
  • Encourage community engineers to write functional tests for all applicable contributions to Magento core and special projects.
  • Announce the end of life for MTF.

 

Contributing and converting tests

 

Join our GitHub project and start converting tests from the project board. To help other issues and developers, feel free to add comments to their issues. Or claim and issue and help!

 

  1. Fork magento-functional-tests-migration
  2. Review available issues from the GitHub board.
  3. To work an issue, claim the issue and move the card to "In progress".
  4. Convert the test from MTF to MFTF.
  5. Submit a Pull Request (PR).

 

Include the issue number in your PR comments. We will help with labels and answer any questions.

 

Understanding MTF test flow

 

To best understand MTF test flows, try running a test in a browser and see what happens. Then work through each part of the test to begin conversions.

 

  1. Run your MTF test. Watch what happens with the test in a web browser.
  2. Read the PHPDoc block of Test Class you want to convert.
    • Constraints declared in test variation are the main test assertions.
    • Assert classes have PHPDoc blocks with human readable description.
  3. Read automated test code and determine what should be done.
  4. Convert the test and generate a PR.

 

If you have questions, post them in the issue or chat with us in the #mftf Slack channel.

 

Configuring your environment to run tests

 

For more information on MTF and MFTF configurations and getting started, please see the following guides:

 

 

If you have any questions or need help getting started, join and ask in the #mftf Slack channel.  

1 Comment