Giter VIP home page Giter VIP logo

e2etesting's Introduction

Cypress-frontend-testing

Project structure:

  • account - tests related with the user account
  • checkout - checkout as customer and checkout as guest
  • content - check if the webpage is loading

Tests

  • register as customer
  • delete customer
  • login
  • logout
  • checkout as customer
  • checkout as guest
  • start homepage
  • pdp
  • plp

Implementation of the tests

  • If you want to use the frontend-tests locally you have to include the cypress folder into the root folder of your project and you have to install the cypress dependencies
  • If you just want to use the tests and run them via Gitlab-ci, just include the cypress folder into your project

The E2E-testsuite-platform package contains commands and helpers supporting you while building E2E tests for Shopware 6.

  • If you want to use your tests locally this package needs to be included
Hint:
  • At the moment it is not automatically installed with the execution of the .gitlab-ci.yml in the Gitlab CI

Installation for local execution of cypress:

  • Precondition: You need to have a package manager like npm to install the dependencies like cypress or E2E
  1. The cypress.config.js is the set configuration set up for cypress and in the cypress.env.json are crendentials for testing
    • if you want to test it with customer credentials, make sure to you the CI/CD environment variables!
  2. If you want to test your E2E tests local, you need to install cypress locally too. npm install cypress --save-dev
    • The --save-dev option is used to install and save your project dependencies under the devDependencies object - Packages installed under devDependencies will be ignored when you run a production build
  3. Install the E2E-testsuite-platform npm install --save @shopware-ag/e2e-testsuite-platform
  4. Now you can open the dashboard with running the command node_modules/.bin/cypress open
  5. Your tests run automatically in the command line with node_modules/.bin/cypress run

Execution on Gitlab

  • At the moment the execution of the cypress based E2E tests is running over Gitlab CI.
  • The shopware-goal which should be tested (e.g. dev/testing) can be defined in the environment variable CYPRESS_ENV_JSON
  • Check Settings here
  • When the E2E-tests are executed, the test result is visible in the GitLab (CI/CD --> Pipelines)
  • to implement the e2e-testsuite-platform package you need to set it up on your .gitlab-ci.yml file

e2etesting's People

Contributors

ruben-allenstein avatar

Watchers

 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.