cypress-testing-template

0.0.1 • Public • Published

cypress-testing-template

Install the project globally:

npm install -g @press-association/cypress-testing-template

Install yo globally using npm:

npm install -g yo

Use the command line to create your new project. Create a directory or empty repository and run the following command inside:

yo @press-association/artillery-test

You will be presented with a number of options.

You can use the spacebar to untick certain options or just hit enter to generate everything

Then you will need to link the generated package.json to your project using:

npm link

cypress-testing-template

Template to be used as basis for PA testing repositories utilising Cypress

Open package.json

Right-click on the editor.

Select 'show npm Scripts' in the popup.

This will display an npm tab in the left side bar, and a npm panel underneath the Project panel.

There are three items:

lint - executes code checks using ESLint.

cypress:ui - executes the UI version of Cypress (mainly used to develop and prove test scripts).

cypress:cmd - executes the command line version of Cypress (used for full test runs).


Setting test defaults - cypress.json

The cypress.json file is used to specify test default values.

baseUrl - This is the default url used in commands such as cy.visit('/');

env - Contains test specific default values, such as usernames and passwords, and alternative urls.

Other entries specify the paths to use for cypress files, and items such as timeouts. Further information can be found at http://Cypress.io

Readme

Keywords

none

Package Sidebar

Install

npm i cypress-testing-template

Weekly Downloads

1

Version

0.0.1

License

none

Unpacked Size

7.89 kB

Total Files

13

Last publish

Collaborators

  • tallpaulhunter