Smoke tests for GOV.UK
A suite of Cucumber tests that probe GOV.UK frontend and backend publishing functionality. The tests use Selenium to manipulate a headless Chrome browser.
The tests are run in two different ways:
Each test should check that a critical area of GOV.UK is working as expected. Read the guidance on what tests belong here and how to write new ones.
Use GOV.UK Docker to run any commands that follow.
Running the test suite
Note: you will need to be connected to the VPN to test against Integration or Staging.
The tests require additional configuration to run successfully on a local machine.
env \ ENVIRONMENT=integration \ SIGNON_EMAIL="<email-address>" \ SIGNON_PASSWORD="<password>" \ bundle exec cucumber
You can use the following environment variables to configure the tests:
ENVIRONMENT: controls domains returned by Plek (see env.rb)
SIGNON_EMAIL: email of a Signon user in $ENVIRONMENT
SIGNON_PASSWORD: password of a Signon user in $ENVIRONMENT
RATE_LIMIT_TOKEN: (optional) a token used to bypass rate limiting if present on apps.
You can try using your own Signon account, but this won’t work if you have Multi Factor Auth enabled. Another option is to use the credentials for the Smokey test user in
bundle exec rake 'eyaml:decrypt_value[integration,smokey_signon_email]' bundle exec rake 'eyaml:decrypt_value[integration,smokey_signon_password]' bundle exec rake 'eyaml:decrypt_value[integration,smokey_rate_limit_token]'