Skip to content

alphagov/smokey

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
log
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GOV.UK Smoke Tests

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.

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