Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Latest commit

 

History

History
41 lines (25 loc) · 2.2 KB

Cypress.md

File metadata and controls

41 lines (25 loc) · 2.2 KB

Cypress

Prerequisites

  • Check the System Requirements first from the Cypress Docs.

Running Cypress

Cypress Test Runner

  • To run Cypress using the test runner you can follow the instructions in the docs or use any of the following commands.

  • npx cypress open

  • yarn run cypress open

  • This will open the test runner and then you can choose between the testing type

    image

  • If you choose e2e testing you will be prompted again to choose the preferred browser.

    image

  • After choosing the browser cypress will open the test runner and automatically detect spec files available in cypress/e2e

    image

  • You can run the tests by simply clicking on the spec file for the test.

Command Line

  • To run cypress using headless mode you can follow the instructions in the docs or use any of the following commands.
  • npx cypress run
  • yarn cypress run
  • The previous commands will run all the tests but if you want to run a single test you can use any of the following commands
  • npm run cy:run -- --record --spec "cypress/e2e/my-spec.cy.js"
  • npx cypress run --record --spec "cypress/e2e/my-spec.cy.js"
  • You can also check all the options that can be added to the cypress run command from here.
  • After executing any of these commands cypress will run and log everything in the console.