Skip to content

Latest commit

 

History

History
29 lines (22 loc) · 1.74 KB

File metadata and controls

29 lines (22 loc) · 1.74 KB

CYPRESS AUTOMATION FRAMEWORK


LOCAL SET UP

In order to run the automated test suite, please follow the steps described below:

  1. If this is the first time cloning the repository, execute the following command in the project's terminal: npm install

  2. Execute the command cp cypress/config/secrets-example.json cypress/config/secrets.json and replace the content in cypress/config/secrets.json with your proper credentials

  • If you want to record your local runs to the cloud, run source cypress/config/set-key.sh
  1. Run one of the commands below depending on which environment needs to be tested

    • To execute the tests using the Test Runner (does not generate reports)

      • npx cypress open --env envKey=dev
      • npx cypress open --env envKey=uat
    • To execute the testing headless (generates the reports)

      • npx cypress run --env envKey=dev
      • npx cypress run --env envKey=uat
  2. To generate the mochawesome complete report, first execute the tests headless and afterwards run the command: npm run awesome-report

Additional options available

  • To record the tests into the Cypress Dashboard CYPRESS_PROJECT_ID={projectId} CYPRESS_RECORD_KEY={record key} npx cypress run --record
  • To choose a specific test file npx cypress run --spec cypress/{SPEC FILE PATH}
  • To choose a pattern of files into the Test Runner npx cypress open testFiles='cypress/tests/e2e/hero*'
  • If the DB test throws an error such as: ER_NOT_SUPPORTED_AUTH_MODE, as seen in, run the following commands: - sudo mysql -u root -p - mysql> ALTER USER the_user IDENTIFIED WITH mysql_native_password BY 'the_password';