Skip to content
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

jimfuqian/BB2-3239-fix-CI-check-selenium-tests #1271

Merged
merged 73 commits into from
Dec 16, 2024

Conversation

JFU-NAVA-PBC
Copy link
Contributor

@JFU-NAVA-PBC JFU-NAVA-PBC commented Dec 3, 2024

JIRA Ticket:
BB2-3239

What Does This PR Do?

Fix the CI check:
Firstly, run selenium tests, which is errored out due to ENV var USE_NEW_PERM_SCREEN is not set.

After satisfied ENV var USE_NEW_PERM_SCREEN, hitting other issues on CI pipeline:

Issue 1: MSLSX is set to true, but the dev-local mock login on 8080 not started as part of "Start bb2 server " step (used to be started), this is causing selenium tests timeout at login step, what happened is that all SLSX endpoints are pointing to SLSX test endpoints which is not consistent with MSLSX=true, so expecting mock login web page widgets on a real medicare login page will timeout.
So change all medicare login url and SLSX URLs to the mock ones
(MSLSX is recommended to be used at CI node because it is faster, safer, and BB2 tests won't be affected by some times intermittent issues at medicare login (test) e.g. MFA is on, not accessible at certain time etc. and SLSX services (test)

Issue 2: chromedriver version and chrome browser version is not compatible which causing webdriver init failure, fixed CI docker image (registered at AWS ECR) with 131 chromedriver and chrome, needs maintain it this way going forward.

Miscellaneous improve on local docker and compose.

What Should Reviewers Watch For?

Review the piepline files and related Dockerfiles and check the image published to AWS ECR.
Review the changes in selenium_generic.py for webdriver initialization: remote driver and local driver
Check the CBC CI check task "Z Check Git Hub PRs" which will replace the current "Check Git Hub PRs"
Run the task "Z Check Git Hub PRs" either by trigger it through a PR push and/or manually start one with "Selenium Test" checked.

If you're reviewing this PR, please check for these things in particular:

Validation

Go to BB2 Jenkins: https://ci.backends.cms.gov/non-oc/job/Blue%20Button/
Go to "Z CHECK - GitHub PRs", run build with selenium tests checkbox checked:

image

it should pass for both with/without "Selenium Tests" checked as shown:

image

Optionally check the local docker compose tasks work as expected:

Following readme to setup ENV vars needed from AWS parameter store and run the following commands (scripts) to pass all sorts of selenium based tests:

  • ./docker-compose/run_selenium_test_local.sh -help to see all tests and options:
  • `Usage:

Syntax: run_selenium_tests_remote.sh [-h|d|p] [SBX|PROD|TEST|]

Options:

-h Print this Help.
-p Test for newer permissions screen. Defaults to older screen.
-g Selenium grid used.
-t Show test case actions on std out.

Examples:

run_selenium_tests_remote.sh -p https://sandbox.bluebutton.cms.gov/ (or SBX)

run_selenium_tests_remote.sh https://api.bluebutton.cms.gov/ (or PROD)

run_selenium_tests_remote.sh -p https://test.bluebutton.cms.gov/ (or TEST)

default to SBX (https://sandbox.bluebutton.cms.gov/)

`

  • ./docker-compose/run_selenium_test_local.sh -help to see all tests and options:
  • `Usage:

Use one of the following command line options for the type of test to run:

slsx  = use SLSX for identity service.

mslsx (default) = use MSLSX for identity service.

account  = test user account management and application management.

logit  = run integration tests for bb2 loggings, MSLSX used as identity service.

Options:

-h Print this Help.
-p Use new permissions screen (defaults to old style screen).
-g Selenium grid used - hub on port 4444.
-t Show test case actions on std out.`

What Security Implications Does This PR Have?

Please indicate if this PR does any of the following:

  • Adds any new software dependencies
  • Modifies any security controls
  • Adds new transmission or storage of data
  • Any other changes that could possibly affect security?
  • Yes, one or more of the above security implications apply. This PR must not be merged without the ISSO or team
    security engineer's approval.

Any Migrations?

  • Yes, there are migrations
    • The migrations should be run PRIOR to the code being deployed
    • The migrations should be run AFTER the code is deployed
    • There is a more complicated migration plan (downtime,
      etc)
  • No migrations

@JFU-NAVA-PBC JFU-NAVA-PBC marked this pull request as draft December 3, 2024 23:56
@JFU-NAVA-PBC JFU-NAVA-PBC marked this pull request as ready for review December 16, 2024 16:17
Copy link
Contributor

@loganbertram loganbertram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked in CI and with the local docker-compose. Everything works and better than ever. Looking good!

@JFU-NAVA-PBC JFU-NAVA-PBC merged commit 356ba58 into master Dec 16, 2024
6 checks passed
@JFU-NAVA-PBC JFU-NAVA-PBC deleted the jimfuqian/BB2-3239-fix-CI-check-selenium-tests branch December 16, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants