Giter VIP home page Giter VIP logo

magento-load-test's Introduction

Load Test Scenarios for Magento 1 and Magento 2

These scenarios were used to perform load tests for Magento 1 and Magento 2 applications in different environments. Results are publicly available on MageCore blog:

Repository Structure

Tests are grouped in application folders which include following assets:

  • media - image files used for catalog products
  • media.sh - script that initializes application media based on catalog and images from media folder
  • data.sql.gz - database dump
  • gatling - load test scenarios for Gatling load testing framework

Environment Configuration

  • OS: Amazon Linux AMI 2015.03
  • Web server: nginx/1.8.0 + php-fpm
  • PHP: 5.5.30 or 7.0.3
  • Varnish: 3.0.5
  • Redis: 3.0.5
  • Database: MySQL 5.6.27

Setup instructions

  • Create database and import dump from data.sql.gz of proper application
  • Install Magento application using database created on the previous step
  • Copy media directory, media.set and media.sh script to some directory
  • Run media.sh /path/to/magento_pub /path/to/media.set /path/to/source_media to initialize product images
  • Install Gatling
  • Copy files from magento1/gatling and magento2/gatling directories to gatling user-files directory
  • Run gatling scenario using following options (please use m1 or m2 instead mX in the parameters bellow):
Option Description Default Value
dataDir Data directory used in test scenarios mXce
users The number of concurrent users 20
ramp Increase load to number of users in, sec 30
during Run test during period, minutes 10
domain Testing domain name magento.test.com
useSecure Use HTTPS for secure pages 0
project Project Name for Report Magento
$ JAVA_OPTS="-Ddomain=www.mXce.com -Dusers=10"
$ gatling -s mX.defaultFrontTest

Magento2 Pre Test Setup

  1. Page load time optimization: build JS, enable JS minification, enable CSS minification
  2. Deploy static content: php bin/magento setup:static-content:deploy
  3. Run compiler: php bin/magento setup:di:compile
  4. Enable production mode: Set $MAGE_MODE production
  5. Reindex catalog: php bin/magento indexer:reindex
  6. Clean cache: php bin/magento cache:clean

magento-load-test's People

Contributors

advocat avatar dimasoroka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.