Skip to main content

Repository: smokey

Smoke tests for GOV.UK

GitHub
smokey
Ownership
#govuk-developers
Hosting
N/A
Category
Utilities

Imported documents

README

A suite of Cucumber tests that probe GOV.UK frontend and backend publishing functionality. We use feature files to describe single applications (eg whitehall, frontend) or cross-application behaviour. The tests use Selenium to manipulate a headless Chrome browser.

The tests are run in two different ways:

Technical documentation

You can use the GOV.UK Docker environment to run the application and its tests with all the necessary dependencies. Follow the usage instructions to get started.

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 govuk-secrets/puppet_aws:

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]'

Further documentation