For an Ecommerce player, in this competitive retail ecosystem, it is necessary to monitor the market scenarios and make necessary changes to the website on a regular basis. These small changes allow Ecommerce companies to respond to the latest trends in the market and operate on par with competitors.  Some of these updates can be new products, offers, discounts, shipping options, payment methods and many more.

While making such changes to the websites regularly, Ecommerce companies should ensure a smooth user experience; otherwise it would lead to a negative impact on the company. To achieve this, a through QA procedure involving user behavior simulation, traffic, and performance needs to be analyzed.  When the changes are so frequent, manual testing procedures become a redundant and a time consuming process. To overcome this, Magento has provided a way to automate the test procedure using Magento Test Automation Framework (MTF).

Why Magento Test Automation Framework?

Though we have a lot of test automation frameworks available, we recommend using PHPUnit with Magento Test Automation Framework (MTF). This combination is an independent platform and allows Magento back end testing with predefined scripts to test the basic functionalities.

Configuring the Magento Test Automation Framework (MTF) is an extensive process.  We have simplified it in the steps mentioned below.

The perquisites for configuring Magento Test Automation Framework (MTF) are;

  1. xampp installation with latest PHP version.
  2. Latest version of Java Development Kit (JDK)
  3. Latest stable version of phpunit.phar file
  4. Download the selenium server jar from here
  5. Download stable MTF-master from git-hub.
  6. Configure the browsers.yml
  7. Configure the environment variables for PHP, Java, phpunit.

Once the initial set up is completed, follow the below mentioned steps for executing the test scripts.

1.  Configure test folder name, .json files in phpunit.xml

2.  Start selenium server by executing this command

java -jar selenium-server-standalone-x.0.jar >> selenium.log
Remember to replace "x” with the version of the selenium.jar which you are using.

3.  Run runtests to execute the suite of scripts.  or  navigate to the test suite folder location:

phpunit --log-json <.json filename>  <name of testsuite folder> 
For example:   phpunit --log-json  test4Nov14.json test

4.  Analyze the test results to ensure the new changes do not affect the existing system.

Magento Test Automation Framework

Impact of Automated Testing:

Ecommerce business operates in an agile development environment where the sprint cycles are short. Even for a very small change, a complete system and regression testing is necessary. Performing a complete manual testing procedure is a time consuming process that beats the primary business objective, which is to make swift changes in accordance to the changing market.

Ecommerce portals have a QA staging and Live servers where these testing procedures are supposed to be implemented. In such scenarios, Magento Test Automation Frameworks comes in handy where we can automate a few test scenarios and use cases.  This reduces the resource utilization and the time to cater the market.

When we look at a few of our customer success stories, it is primarily due to a successful implementation of Magento Test Automation Framework into the QA procedure. For Charming Charlie, the Magento Test automation Framework has reduced the regression testing time to about 50%.

Responding to customer needs and the changing market trends at the right time is of paramount importance for any Ecommerce player. Magento Test Automation Framework empowers retailers to respond dynamically and at the same time ensures an error free shopping experience.

References

Be the first to Know

Subscribe to our blog to get the latest articles directly to your inbox.

READY TO DRIVE SALES?

Request a Quote Today

Request a Quote

Leave a Reply

3 Comments on "How to Implement Magento Test Automation Framework in Your Ecommerce Website?"


Guest
Diwaker
1 year 7 months ago

It’s clear that Master branch of MTF needs to be downloaded from Git and needs to be setup. But could you please elaborate more on:
Do we need to setup MTF as a separate project? Or it will be downloaded inside MAGEROOT?
It will be awesome if some information about the MTF folder structure relative to MAGENTO installation can be provided?

Bhavani
Author
1 year 6 months ago

Hi Diwaker,
The MTF setup is entirely changed recently. You can install MTF with the composer in magento dev/tests/functional folder.
Please refer the below link for the set up.

http://docs.magento.com/m1/ce/user_guide/magento/magento-test-framework.html

Guest
@nky
2 years 3 months ago

Hello can you please show an example with latest Magento Version (2.x), what needs to be configure and how to run it