This repository contains cypress tests and applies many approaches:
- It uses github actions to run all tests
- cypress dashboard is integrated
- custom plugin to fetch auth device link from email and authorize the device (if needed)
- uses ansible-vault to decrypt gmail api credentials
- and more
Cypress dashboard link with test results
- NodeJS
- NPM
- Python
- Clone this respository:
$ git clone https://github.com/tiagodread/cypress-challenge.git
- Go to the main folder:
$ cd cypress-challenge
- Install npm and python dependencies:
$ npm install
$ pip install -r requirements.txt
- Decrypt
credentials.json
andgmail_token.json
, you'll need the vault password in order to be able to decrypt the files:
$ ansible-vault decrypt cypress/plugins/credentials.json
$ ansible-vault decrypt cypress/plugins/gmail_token.json
- Export the environment variables using correct values:
export CYPRESS_BASE_URL='https://environment-host' # cypress base url under test (local, stage, production)
export CYPRESS_USER_EMAIL='[email protected]' # cypress test user email
export CYPRESS_USER_PASSWORD='123test' # cypress test user password
Gui mode:
$ npm run cy:open
Headless mode:
$ npm run cy:run
Enjoy :)