Magento Functional Testing Framework - a way to seriously write automated tests in your project? - Łukasz Adamczyk, QA at Divante
Presentation originally presented at Magento Lightning Talks meetup on October 3rd, 2019, in Divante HQ.
Learn more at Divante at https://divante.com
Check out more Magento Lightning Talks at https://divante.com/blog/tag/magento-lightning-talks/
young call girls in Uttam Nagar🔝 9953056974 🔝 Delhi escort Service
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 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
4. 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
5. 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
6. 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
└── ...
11. 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
12. 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/