Coder Social home page Coder Social logo

psfunctionaltests's Introduction

Run test with docker

Prerequisites

  • Install docker
  • Install docker-compose

Run the tests

docker-compose up

This will

  • start a mysql container
  • start a selenium-chrome container
  • start a prestashop container and launch prestashop installation
  • start the tests container and launch the test in /tmp/test/itg/1.7/index.webdriverio.js

Environnement variable can be used to override PS_VERSION=1.6|1.7 (Default:1.7) URL=domain name where prestashop is running (default:prestashop) MODULE= to install a module (default:) SCRIPT= to change the script to launch (default:)

Exemple: Modify docker-compose.yml to add the environment variables in the tests service section

After docker-compose up when db, selenium-chrome and prestashop are running you can launch the tests with: docker-compose run tests -e MODULE=data-tech-name

Run test without docker

To use the following test suites, you need to install PrestaShop in English with setting country to France. (or you may change some assertions like the separator “,” or “.”, “€” or “$” or “£” or …) You need to create a user in Back Office with SuperAdmin rights and the following information’s:

Prerequisites

To use nodeJS tests, you need to install:

  • NodeJS
  • Npm
  • Webdrivers pour Chrome et firefox

Required modules to install using npm are:

  • json
  • minimist
  • mocha
  • node-uuid
  • parsed-url
  • q
  • req
  • should
  • webdriverio
  • window
  • selenium-standalone (make sure you'll install a compatible version with your browser version)

Run the tests

  • First, you need to start selenium-standalone
selenium-standalone start

Note: If you are using it for the first time you need to install it before starting it : selenium-standalone install

  • Go to the folder of the version you want to test (in \test\itg, go into folder 1.6 or 1.7) and execute one of the following lines:

    • Launch tests without module installation :
    mocha index.webdriverio.js --URL=localhost/1.7.0.0 –SAUCELABS=true --INSTALL=true
    
    • Launch tests with module installation:
    mocha index.webdriverio.js --URL=localhost/1.7.0.0 --MODULE=statsbestmanufacturers –SAUCELABS=true --INSTALL=true
    

Where :

-URL: Front office URL of your prestashop website (without the “http://”)

-MODULE (optional) : « data-tech-name » of the module

-SAUCELABS (optional): Turn it to « true » to use SauceLabs (you need to provide yours SauceLabs ID in your Travis folder)

-INSTALL (optional, default to false): Turn it to « true » to install PrestaShop before launching tests

-DB_SERVER (optional, default to mysql): To add your database server address

-DB_NAME (optional, default to prestashop): Set the database name

-DB_USER (optional, default to root): To add your Database login

-DB_PASSWD (optional, default doge): To add your Database password or -DB_EMPTY_PASSWD (optional): Set it if your database doesn't require any password

Note: To select the module to test, we decided to use the « data-tech-name » because this variable give us only one result in the search module part, in this case we are sure to select the right module

Sending generated report via mail

In case you want to send the generated report via mail, you should active the option "less secure apps" in the mailbox of the sender: https://support.google.com/accounts/answer/6010255?hl=fr

psfunctionaltests's People

Contributors

basma-yangui-prestashop avatar fatmabouchekoua avatar hatem-hadrich avatar jocel1 avatar mbadrani avatar quetzacoalt91 avatar toutantic avatar tzvicons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.