Skip to content

Running the Selenium Tests

tej99 edited this page Sep 28, 2017 · 4 revisions

Downloading chromedriver

Download chromedriver: https://chromedriver.storage.googleapis.com/index.html?path=2.32/ (Windows and Mac)

Unzip chromedriver into the following path within the project: tests/behavioural/features/steps

Running the Selenium tests

Ensure that the correct line of code has been uncommented for your operating system in the browser.py file. If running the tests locally Secure Message and front stage must be running before running the tests. The configuration for front stage should also be pointing to the local secure messaging. (Examples of configurations can be seen below.

To run the tests run the run_behave_tests.py file. When running in PyCharm the running config for run_behave_tests should be: APPSETTINGS=TestingConfig

Example Configs

Secure Messaging

Variable Value
RAS_PARTY_SERVICE_PORT 80
RAS_FRONTSTAGE_CLIENT_ID [email protected]
RM_CASE_SERVICE_PORT 80
SECURITY_USER_NAME sdc.sit
SMS_LOG_LEVEL DEBUG
JSON_INDENT_LOGGING 1
RM_CASE_SERVICE_HOST casesvc-sit.apps.devtest.onsclofo.uk
SECURITY_USER_PASSWORD despise.sputa.airmail.cove.oxcart
SECRET_KEY ONS_DUMMY_KEY
SECURE_MESSAGING_DATABASE_URL sqlite:////tmp/messages.db
RAS_FRONTSTAGE_CLIENT_SECRET password
PYTHONUNBUFFERED 1
SM_JWT_ENCRYPT 0
RAS_PARTY_SERVICE_HOST ras-party-service-sit.apps.devtest.onsclofo.uk

Frontstage

Variable Value
RAS_FRONTSTAGE_CLIENT_ID [email protected]
RM_CASE_SERVICE_PORT 80
JSON_INDENT_LOGGING 1
SECRET_KEY ONS_DUMMY_KEY
RM_IAC_SERVICE_PORT 80
RAS_COLLECTION_INSTRUMENT_SERVICE_HOST ras-collection-instrument-sit.apps.devtest.onsclofo.uk
RM_COLLECTION_EXERCISE_SERVICE_PORT 80
RAS_COLLECTION_INSTRUMENT_SERVICE_PORT 80
RAS_API_GATEWAY_SERVICE_HOST ras-api-gateway-sit.apps.devtest.onsclofo.uk
SM_JWT_ENCRYPT 0
RAS_PARTY_SERVICE_HOST ras-party-service-sit.apps.devtest.onsclofo.uk
RAS_PARTY_SERVICE_PORT 80
RAS_SECURE_MESSAGE_SERVICE_HOST localhost
ONS_OAUTH_HOST ras-django-sit.apps.devtest.onsclofo.uk
RM_SURVEY_SERVICE_PORT 80
RAS_SECURE_MESSAGE_SERVICE_PORT 5050
RM_IAC_SERVICE_HOST iacsvc-sit.apps.devtest.onsclofo.uk
SECURITY_USER_NAME sdc.sit
RM_CASE_SERVICE_HOST casesvc-sit.apps.devtest.onsclofo.uk
SECURITY_USER_PASSWORD despise.sputa.airmail.cove.oxcart
RAS_FRONTSTAGE_CLIENT_SECRET password
PYTHONUNBUFFERED 1
RAS_API_GATEWAY_SERVICE_PORT 80
RM_SURVEY_SERVICE_HOST surveysvc-sit.apps.devtest.onsclofo.uk
RM_COLLECTION_EXERCISE_SERVICE_HOST collectionexercisesvc-sit.apps.devtest.onsclofo.uk
Clone this wiki locally