Repository: trade-tariff-testing
Trade Tariff Testing Tool
README
This repository is responsible for validating integrations between different applications in the Online Trade Tariff service
There are currently three enviornments we might run end-to-end tests against:
- development
- staging
- production
Regression suites for each of these environments are configured using github actions
Prerequisites
- node
- yarn
- an up-to-date .env file
Install dependencies with yarn
yarn install
Running tests
Run a single test:
yarn run cypress run --spec cypress/e2e/HOTT-Shared/devSmokeTestCI.cy.js
Run all tests
yarn run cypress run
Run devOnly tagged tests
yarn run cypress run --env grepTags=devOnly
Run smokeTests but not the devOnly ones
yarn run cypress run --env grepTags=-devOnly+smokeTest
Run interactive cypress UI
yarn run open:dev
yarn run open:staging
yarn run open:prod
Handy tips when running tests
Cypress API Docs
Running only one test
Place this in the individual test descripiton
it.only(
Using headed browser for debugging the page
npx cypress run --headed --spec {fileName}
Setting the timeout in headed mode to give yourself time to analyse the page
Place this at the top of your test
cy.config('defaultCommandTimeout', 100000);