Skip to content

marzzy/my-e2e-boilerplate

Repository files navigation

My E2E Boilerplate

License: AGPL v3 Renovate enabled

Tools

Cypress Tools

Cypress builds on these popular tools:

Install

  1. Clone the project on your system.
  2. If you have npm installed on your system ,you just need to run npm install on the project directory if not,install it first.
  3. Cypress needs some dependencies to be installed in your system , you can find it in here.

Config your local Cypress project

Config run_host_project.sh :

  1. copy run_host_project_EXAMPLE.sh and rename it to run_host_project.sh.
  2. open run_host_project.sh and replace 'PROJECT_PATH' in the 2th line with your local project path
  3. make sure run_host_project.sh has execute access,if not run chmod +x run_host_project.sh.

Config cypress.env.json :

  1. copy cypress.env_EXAMPLE.json and rename it to cypress.env.json.
  2. if your local project run in http://localhost:8080 its ok,if not change it into yours.

Set record key as environment variable

  1. Within Cypress CI on Runs tab , get the Record Key.
  2. Set Record key as environment variable by run export CYPRESS_RECORD_KEY=<Record Key> in Cypress project directory.

Config cypress.json

  1. Modified <YOUR_PROJECT_ID> with the one that Cypress give to you.

Scripts

  • npm run host:start : to run your local project and use run_host_project.sh for it. (so don't forget to config it before using this command).

  • npm run cy:run : to running Cypress CI. (If you are using it in your local, you should run your local project first and config your cypress.env.json file).

  • npm run cy:record: to asking Cypress to run new tests and record video save it on cypress/video directory and upload to the dashboard service after every spec file runs, successful or not. :warnigng: Cypress clears any existing videos before a Cypress run.

  • npm run cy:report : to run all the test and make a .xml file on cypress/results. :warnigng: Cypress clears any existing reports before a Cypress run.

Noticed

  1. To Set up Intelligent code completion in your Dev Environment can use this link.
  2. Cypress Projects can run on all CI providers.we are using CircleCI.
  3. package-lock.json is using by CircleCI so never ever delete it or move it to .gitignore file.

Authors

License

This project is licensed under the terms of the AGPLv3 (GNU General Public License v3.0) license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages