- 
                Notifications
    You must be signed in to change notification settings 
- Fork 28
BB2-4174: Fixed selenium tests #1399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8abe176
              44ef50a
              47e00e8
              14f1277
              7a2b6a4
              34a1a67
              ce75d82
              474375a
              5c84fcc
              b0a3199
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -25,17 +25,17 @@ display_usage() { | |
| echo "Options:" | ||
| echo | ||
| echo "-h Print this Help." | ||
| echo "-p Test for newer permissions screen. Defaults to older screen." | ||
| echo "-g Selenium grid used." | ||
| echo "-t Show test case actions on std out." | ||
| echo '-l Use Login with Medicare.gov button' | ||
| echo | ||
| echo "Examples:" | ||
| echo | ||
| echo "run_selenium_tests_remote.sh -p https://sandbox.bluebutton.cms.gov/ (or SBX)" | ||
| echo "run_selenium_tests_remote.sh https://sandbox.bluebutton.cms.gov/ (or SBX)" | ||
| echo | ||
| echo "run_selenium_tests_remote.sh https://api.bluebutton.cms.gov/ (or PROD)" | ||
| echo | ||
| echo "run_selenium_tests_remote.sh -p https://test.bluebutton.cms.gov/ (or TEST)" | ||
| echo "run_selenium_tests_remote.sh https://test.bluebutton.cms.gov/ (or TEST)" | ||
| echo | ||
| echo "<bb2 server url> default to SBX (https://sandbox.bluebutton.cms.gov/)" | ||
| echo | ||
|  | @@ -50,7 +50,8 @@ echo_msg | |
| # Set bash builtins for safety | ||
| set -e -u -o pipefail | ||
|  | ||
| export USE_NEW_PERM_SCREEN=false | ||
|         
                  stiwarisemanticbits marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| USE_LOGIN_WITH_MEDICARE_BUTTON="${USE_LOGIN_WITH_MEDICARE_BUTTON:-}" | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't seem to get a run of  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can add this variable to docker-compose/selenium-env-vars.env There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried this, I added  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It depends on how you are executing it Then in terminal you have to do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That worked, thanks! | ||
| export USE_NEW_PERM_SCREEN=true | ||
| export SERVICE_NAME="selenium-tests-remote" | ||
| # TODO optionally add the Spanish selenium tests here if desired | ||
| export TESTS_LIST="./apps/integration_tests/selenium_tests.py ./apps/integration_tests/selenium_spanish_tests.py" | ||
|  | @@ -66,10 +67,10 @@ while getopts "hpgt" option; do | |
| h) | ||
| display_usage; | ||
| exit;; | ||
| p) | ||
| export USE_NEW_PERM_SCREEN=true;; | ||
| g) | ||
| export SELENIUM_GRID=true;; | ||
| l) | ||
| export USE_LOGIN_WITH_MEDICARE_BUTTON=true;; | ||
| t) | ||
| export PYTEST_SHOW_TRACE_OPT='-s';; | ||
| \?) | ||
|  | @@ -93,6 +94,9 @@ then | |
| ;; | ||
| TEST) | ||
| export HOSTNAME_URL="https://test.bluebutton.cms.gov/" | ||
| if [[ -z "${USE_LOGIN_WITH_MEDICARE_BUTTON}" ]]; then | ||
| export USE_LOGIN_WITH_MEDICARE_BUTTON=true | ||
| fi | ||
| ;; | ||
| *) | ||
| if [[ ${last_arg} == 'http'* ]] | ||
|  | @@ -111,6 +115,7 @@ fi | |
| SYSTEM=$(uname -s) | ||
|  | ||
| echo "USE_NEW_PERM_SCREEN=" ${USE_NEW_PERM_SCREEN} | ||
| echo "USE_LOGIN_WITH_MEDICARE_BUTTON=" ${USE_LOGIN_WITH_MEDICARE_BUTTON} | ||
| echo "BB2 Server URL=" ${HOSTNAME_URL} | ||
| echo "Selenium grid=" ${SELENIUM_GRID} | ||
|  | ||
|  | @@ -119,7 +124,10 @@ export USE_MSLSX=false | |
|  | ||
| # stop all before run selenium remote tests | ||
| docker compose -f docker-compose.selenium.remote.yml down --remove-orphans | ||
| docker compose -f docker-compose.selenium.remote.yml run selenium-remote-tests bash -c "SELENIUM_GRID=${SELENIUM_GRID} pytest ${PYTEST_SHOW_TRACE_OPT} ${TESTS_LIST}" | ||
| docker compose -f docker-compose.selenium.remote.yml run selenium-remote-tests bash -c \ | ||
| "SELENIUM_GRID=${SELENIUM_GRID} \ | ||
| USE_LOGIN_WITH_MEDICARE_BUTTON=${USE_LOGIN_WITH_MEDICARE_BUTTON} \ | ||
| pytest ${PYTEST_SHOW_TRACE_OPT} ${TESTS_LIST}" | ||
|  | ||
| # Stop containers after use | ||
| echo_msg | ||
|  | ||
Uh oh!
There was an error while loading. Please reload this page.