- Cypress - E2E testing tool
- eslint-plugin-cypress - as an ESLint plugin for your Cypress tests
- eslint-plugin-chai-friendly - to overrides 'no-unused-expressions' to make it friendly towards chai(which we use for assertion along with our Cypress tests)
- junit : 3rd party reporters for Mocha which is built into Cypress
- cypress/snapshot : as DOM element snapshot testing tool
Cypress builds on these popular tools:
- Clone the project on your system.
- If you have
npm
installed on your system ,you just need to runnpm install
on the project directory if not,install it first. - Cypress needs some dependencies to be installed in your system , you can find it in here.
- Make sure you are login in Cypress Dashboard Service.
- copy
run_host_project_EXAMPLE.sh
and rename it torun_host_project.sh
. - open
run_host_project.sh
and replace 'PROJECT_PATH' in the 2th line with your local project path - make sure
run_host_project.sh
has execute access,if not runchmod +x run_host_project.sh
.
- copy
cypress.env_EXAMPLE.json
and rename it tocypress.env.json
. - if your local project run in
http://localhost:8080
its ok,if not change it into yours.
- Within Cypress CI on
Runs
tab , get the Record Key. - Set Record key as environment variable by run
export CYPRESS_RECORD_KEY=<Record Key>
in Cypress project directory.
- Modified
<YOUR_PROJECT_ID>
with the one that Cypress give to you.
-
npm run host:start
: to run your local project and userun_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 oncypress/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 oncypress/results
. :warnigng: Cypress clears any existing reports before a Cypress run.
- To Set up Intelligent code completion in your Dev Environment can use this link.
- Cypress Projects can run on all CI providers.we are using CircleCI.
- package-lock.json is using by CircleCI so never ever delete it or move it to .gitignore file.
- Marzzieh Moghtaderi - Marzzy Mogh
This project is licensed under the terms of the AGPLv3 (GNU General Public License v3.0) license.