Łukasz Adamczyk | Divante QA
Magento Functional
Testing Framework
a way to seriously write automated
tests in your next project?
Let’s talk about
eCommerce
Hi, my name is Lukasz Adamczyk
I am a Software Tester with few years of experience, focus
on Magento from 2 years.
email: ladamczyk@divante.com
Magento Functional Testing Framework
What is a MFTF?
● Open source test framework project for Magento ecosystem
● MFTF is evolution of MTF
● First step to learn tests automation
● Enables automation of regression tests
Magento Functional Testing Framework
What you need to do and learn to be able to
start implementing MFTF in your projects?
● No requirements for knowledge of programming languages, you should know basic of XML
tags and Xpath to find specific element on site
● Minimum version -Magento 2.2
● Selenium Server Standalone 3.1 or later
● Composer 1.3 or later
● ChromeDriver 2.33 or alternatives
● Java 1.8 or later
● You can install instance of Magento on your own physical machine and start to learning and
contributing MFTF
● All tests run in live mode or headless mode
Magento Functional Testing Framework
Why we should automate testing in
MFTF from the beginning of project
● Easy start to learning automation because of low entry threshold
● Improving the efficiency of the development team's work
● Implementation of automated tests, regardless of whether they are in the
Client's budget, because it improves the quality of work and code
● You can learn new dedicated solution to Magento
● Contributing tests - benefit for You and Divante
● Dedicated Magento solution
● Save time- you can reduce manual testing after every deploy
● You can add a test cases of new and custom functionalities
Magento Functional Testing Framework
MFTF components
● Test - whole test scenario
{Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/
● Annotations- comments .descriptions, titles..
{Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/
● Before & After- steps before and after test
{Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/
● ActionGroup- group of actions (fill the form..)
{Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/ActionGroup/
● Page - modified concept of PageObjects
{Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/Page/
● Section - part of Page, UI elements on a page used in a test( footer, header..)
{Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/Section/
● Entity- set that constains data(weight, password, name...)
{Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/Data/
● Metadata- Api requests(CREATE, DELETE..)
{Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/Metadata/
<Path>
├── ActionGroup
│ └── ...
├── Data
│ └── ...
├── Metadata
│ └── ...
├── Page
│ └── ...
├── Section
│ └── ...
└── Test
└── ...
Magento Functional Testing Framework
MFTF executing flow
XML CODECEPTION
SELENIUM
DRIVER
PHP
Magento Functional Testing Framework
Integrations MFTF with other tools.
● Report integration with Allure
● Integration with Browserstack
Magento Functional Testing Framework
How the test execution looks like in the
console?
Magento Functional Testing Framework
Sample Allure report
Magento Functional Testing Framework
Disadvantages and problems
● Very complicated file structure in tests directory
● Hard to install and configuration
● Infinite migration from MTF tests
● No specific guidelines for creating new test cases
● No coverage of all functionalities
● Only on >= Magento 2.2
Magento Functional Testing Framework
How to start contributing to MFTF
tests
● Documentation-
https://devdocs.magento.com/mftf/docs/getting-starte
d.html
● MFT test migration to MFTF - 315 issues
https://github.com/magento/magento-functional-tests
-migration/issues
● Magento Community Engineering
Slack - #mftf
https://magentocommeng.slack.com/
Do A Discovery
… or how to figure out what a client needs?
LEARN MORE AT
DIVANTE.COM/BLOG

Magento Functional Testing Framework a way to seriously write automated tests in your next project?

  • 1.
    Łukasz Adamczyk |Divante QA Magento Functional Testing Framework a way to seriously write automated tests in your next project?
  • 2.
    Let’s talk about eCommerce Hi,my name is Lukasz Adamczyk I am a Software Tester with few years of experience, focus on Magento from 2 years. email: ladamczyk@divante.com
  • 3.
    Magento Functional TestingFramework What is a MFTF? ● Open source test framework project for Magento ecosystem ● MFTF is evolution of MTF ● First step to learn tests automation ● Enables automation of regression tests
  • 4.
    Magento Functional TestingFramework What you need to do and learn to be able to start implementing MFTF in your projects? ● No requirements for knowledge of programming languages, you should know basic of XML tags and Xpath to find specific element on site ● Minimum version -Magento 2.2 ● Selenium Server Standalone 3.1 or later ● Composer 1.3 or later ● ChromeDriver 2.33 or alternatives ● Java 1.8 or later ● You can install instance of Magento on your own physical machine and start to learning and contributing MFTF ● All tests run in live mode or headless mode
  • 5.
    Magento Functional TestingFramework Why we should automate testing in MFTF from the beginning of project ● Easy start to learning automation because of low entry threshold ● Improving the efficiency of the development team's work ● Implementation of automated tests, regardless of whether they are in the Client's budget, because it improves the quality of work and code ● You can learn new dedicated solution to Magento ● Contributing tests - benefit for You and Divante ● Dedicated Magento solution ● Save time- you can reduce manual testing after every deploy ● You can add a test cases of new and custom functionalities
  • 6.
    Magento Functional TestingFramework MFTF components ● Test - whole test scenario {Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/ ● Annotations- comments .descriptions, titles.. {Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/ ● Before & After- steps before and after test {Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/ ● ActionGroup- group of actions (fill the form..) {Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/ActionGroup/ ● Page - modified concept of PageObjects {Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/Page/ ● Section - part of Page, UI elements on a page used in a test( footer, header..) {Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/Section/ ● Entity- set that constains data(weight, password, name...) {Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/Data/ ● Metadata- Api requests(CREATE, DELETE..) {Magento_Root}/app/code/Magento/{Module}/Test/Mftf/Test/Metadata/ <Path> ├── ActionGroup │ └── ... ├── Data │ └── ... ├── Metadata │ └── ... ├── Page │ └── ... ├── Section │ └── ... └── Test └── ...
  • 7.
    Magento Functional TestingFramework MFTF executing flow XML CODECEPTION SELENIUM DRIVER PHP
  • 8.
    Magento Functional TestingFramework Integrations MFTF with other tools. ● Report integration with Allure ● Integration with Browserstack
  • 9.
    Magento Functional TestingFramework How the test execution looks like in the console?
  • 10.
    Magento Functional TestingFramework Sample Allure report
  • 11.
    Magento Functional TestingFramework Disadvantages and problems ● Very complicated file structure in tests directory ● Hard to install and configuration ● Infinite migration from MTF tests ● No specific guidelines for creating new test cases ● No coverage of all functionalities ● Only on >= Magento 2.2
  • 12.
    Magento Functional TestingFramework How to start contributing to MFTF tests ● Documentation- https://devdocs.magento.com/mftf/docs/getting-starte d.html ● MFT test migration to MFTF - 315 issues https://github.com/magento/magento-functional-tests -migration/issues ● Magento Community Engineering Slack - #mftf https://magentocommeng.slack.com/
  • 13.
    Do A Discovery …or how to figure out what a client needs?
  • 15.