Skip to content

Setup and run automated tests using Google Sheet and Cypress.io

License

Notifications You must be signed in to change notification settings

joacim-boive/lensway-tests

Repository files navigation

Lensway Cypress Tests

Using Cypress to test the lensway websites by configuring a Google Sheet

Installing

Firstly, we need to install our dependencies to be able to run the project. In a terminal, from the project root:

yarn

Getting Started

Make a copy of this Google Sheet. It must retain the format and tab names to work as we rely on these.

Get your own Google Sheet API key here. Update sheet-config.js with your key and spreadsheet id.

Just run yarn in a terminal (or "npm run test run" if you're old school ;) To just run the tests:

yarn test run

If you need to interact with the tests:

yarn test open

Read the rest of the details on how Cypress works over @ Cypress

Background

The tests are intended to run on the CI server (Jenkins at the time of this writing). Don't install Cypress globally, it's intended to be tied to a project so we can be sure that the test works with the running version.

Details for the implementation of Google Sheet is contained in the sheet-config.js file.

Using

TODO

  • Replace my private Google Sheet API key with a Lensway official one

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details