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 via a Jenkins job in each environment (e.g. Integration).
The job is triggered in multiple ways:
- Every few minutes via cron scheduler
- On demand, to check if a change breaks something. This is done when deploying GOV.UK applications, Puppet and other code, such as CDN config.
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.
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.
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]'