This project contains Cypress tests for the WeatherAPI service, including API and UI tests on the WeatherAPI Explorer.
- Run
npm iif cloned from GitHub repository.
- Run tests by running
run-testsscripts inpackage.json.
Cypress will run the tests in cypress 'run' mode.
- Run in headless mode to review results in terminal only.
- Run in headed mode to also see the test running in the browser (browser will close after each file tests have completed).
For a better test review experience with tons of benefits, open the Cypress app & run tests from there in cypress 'open' mode.
- Run the
open-cypressscript inpackage.json. - The Cypress app will open (will ask for network discoverability permissions).

- Choose 'E2E Testing'.

- Choose Browser - special cypress browser will open.

- Choose tests file to run - API or Web UI test files.
-
Cypress runs inside the browser - giving it direct access, unlike other tools which interact with the browser using a middleware driver. This means Cypress can fire & listen to events directly.
-
Cypress Time Machine - Examine test execution step by step.
-
Logs, Screenshots & Videos - Easily debug with helpful Cypress logs, screenshots & videos taken on test failure.
- Expired API Key - Generate a new API key & replace in
cypress.env.json.