diff --git a/app/bamboo.yml b/app/bamboo.yml index ea099f7c1..873d43d42 100644 --- a/app/bamboo.yml +++ b/app/bamboo.yml @@ -121,7 +121,7 @@ modules: httpsampler.ignore_failed_embedded_resources: "true" selenium: chromedriver: - version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing + version: "131.0.6778.69" # Supports Chrome version 131. You can refer to https://googlechromelabs.github.io/chrome-for-testing reporting: - data-source: sample-labels module: junit-xml diff --git a/app/bitbucket.yml b/app/bitbucket.yml index fdf33dd52..b8eb23f73 100644 --- a/app/bitbucket.yml +++ b/app/bitbucket.yml @@ -87,7 +87,7 @@ modules: httpsampler.ignore_failed_embedded_resources: "true" selenium: chromedriver: - version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing + version: "131.0.6778.69" # Supports Chrome version 131. You can refer to https://googlechromelabs.github.io/chrome-for-testing reporting: - data-source: sample-labels module: junit-xml diff --git a/app/confluence.yml b/app/confluence.yml index 677beb1ed..3edd4c066 100644 --- a/app/confluence.yml +++ b/app/confluence.yml @@ -114,7 +114,7 @@ modules: httpsampler.ignore_failed_embedded_resources: "true" selenium: chromedriver: - version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing + version: "131.0.6778.69" # Supports Chrome version 131. You can refer to https://googlechromelabs.github.io/chrome-for-testing reporting: - data-source: sample-labels module: junit-xml diff --git a/app/jira.yml b/app/jira.yml index a4f8c39cb..a229625d0 100644 --- a/app/jira.yml +++ b/app/jira.yml @@ -115,7 +115,7 @@ modules: httpsampler.ignore_failed_embedded_resources: "true" selenium: chromedriver: - version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing + version: "131.0.6778.69" # Supports Chrome version 131. You can refer to https://googlechromelabs.github.io/chrome-for-testing reporting: - data-source: sample-labels module: junit-xml diff --git a/app/jmeter/bitbucket.jmx b/app/jmeter/bitbucket.jmx index abab3ad3a..fdad80d6b 100644 --- a/app/jmeter/bitbucket.jmx +++ b/app/jmeter/bitbucket.jmx @@ -92,7 +92,7 @@ - + ${application.hostname} ${application.port} ${application.protocol} @@ -254,7 +254,7 @@ log.info("GIT_LOG_DIR: " + gitLogDir); - + ${__BeanShell(import org.apache.commons.lang3.SystemUtils; !SystemUtils.IS_OS_WINDOWS;)} false true @@ -303,44 +303,184 @@ else{ - + - - ${application.postfix}/login - true - POST + + Detected the start of a redirect chain + ${application.postfix}//login + GET true false - - - false - ${admin_login} - = - true - j_username - - - false - ${admin_password} - = - true - j_password - - + - + + + + Accept-Language + en-US,en;q=0.5 + + + Upgrade-Insecure-Requests + 1 + + + Content-Type + application/x-www-form-urlencoded + + + Accept-Encoding + gzip, deflate + + + Accept + text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 + + + + + 200 Assertion.response_code false - 1 + 2 + + false + loginform + loginform + $1$ + NOT_FOUND + 1 + all + + false + + + + groovy + + + true + String loginform = vars.get("loginform"); + +if ("NOT_FOUND".equals(loginform)) { + vars.put("legacy_login_form", "false"); + log.info("2SVlogin flow detected"); +} else { + vars.put("legacy_login_form", "true"); + log.info("legacy login flow detected"); +} + + + + + groovy + + + true + log.info("Legacy login flow: ${legacy_login_form}") + + + + + + ${__groovy(vars.get("legacy_login_form") == 'false')} + false + true + + + + 2sv login flow + ${application.postfix}/rest/tsv/1.0/authenticate + POST + true + true + + + + false + {"username": "${admin_login}", + "password": "${admin_password}", + "rememberMe": "True", + "targetUrl": "" +} + = + + + + + + + + + Content-Type + application/json + + + + + + + 200 + + + Assertion.response_code + false + 2 + + + + + + ${__groovy(vars.get("legacy_login_form") == 'true')} + false + true + + + + ${application.postfix}/login + true + POST + true + false + + + + false + ${admin_login} + = + true + j_username + + + false + ${admin_password} + = + true + j_password + + + + + + + + 200 + + + Assertion.response_code + false + 1 + + + ${application.postfix}/rest/ssh/1.0/keys @@ -374,7 +514,7 @@ vars.put("SERVER_SSH_KEYS", result.join("::")); - + groovy @@ -443,7 +583,7 @@ vars.put("USER_SSH_KEY", new File('${__P(PRIVATE_SSH_KEY_LOCATION - + ${application.postfix}/j_atl_security_logout true POST @@ -454,7 +594,7 @@ vars.put("USER_SSH_KEY", new File('${__P(PRIVATE_SSH_KEY_LOCATION - + groovy @@ -473,7 +613,7 @@ else{ - + 1 0 true @@ -496,7 +636,7 @@ else{ shareMode.all - + ${__P(DATASETS_DIR)}/bitbucket/repos.csv REPO_SLUG,PROJECT_KEY @@ -508,7 +648,7 @@ else{ shareMode.all - + groovy @@ -554,7 +694,7 @@ vars.put("REPO_FOLDER", gitTmpWorkspace + "/clone-push-" + v - + true 0 git @@ -632,7 +772,7 @@ if (responseCode != "0") { - + java @@ -662,7 +802,7 @@ import java.util.UUID; } - + true -1 diff --git a/app/jsm.yml b/app/jsm.yml index 9877cd4b8..b393bdf89 100644 --- a/app/jsm.yml +++ b/app/jsm.yml @@ -167,7 +167,7 @@ modules: httpsampler.ignore_failed_embedded_resources: "true" selenium: chromedriver: - version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing + version: "131.0.6778.69" # Supports Chrome version 131. You can refer to https://googlechromelabs.github.io/chrome-for-testing reporting: - data-source: sample-labels module: junit-xml diff --git a/app/selenium_ui/bitbucket/modules.py b/app/selenium_ui/bitbucket/modules.py index 5827bcd64..f8149ef2c 100644 --- a/app/selenium_ui/bitbucket/modules.py +++ b/app/selenium_ui/bitbucket/modules.py @@ -34,12 +34,11 @@ def login(webdriver, datasets): BITBUCKET_SETTINGS.admin_login, BITBUCKET_SETTINGS.admin_password) webdriver.app_version = version.parse(client.get_bitbucket_version()) - login_page = LoginPage(webdriver) webdriver.debug_info = generate_debug_session_info(webdriver, datasets) + login_page = LoginPage(webdriver) @print_timing("selenium_login") def measure(): - @print_timing("selenium_login:open_login_page") def sub_measure(): login_page.go_to() @@ -48,6 +47,7 @@ def sub_measure(): login_page.go_to() sub_measure() + login_page.wait_for_page_loaded() login_page.set_credentials(datasets['current_session']['username'], datasets['current_session']['password']) @print_timing("selenium_login:login_get_started") diff --git a/app/selenium_ui/bitbucket/pages/pages.py b/app/selenium_ui/bitbucket/pages/pages.py index e6adb51c6..9978b2eb9 100644 --- a/app/selenium_ui/bitbucket/pages/pages.py +++ b/app/selenium_ui/bitbucket/pages/pages.py @@ -8,6 +8,17 @@ class LoginPage(BasePage): page_url = UrlManager().login_url() + page_loaded_selector = LoginPageLocators.footer_panel + + def __init__(self, driver): + super().__init__(driver) + self.is_2sv_login = False + + def wait_for_page_loaded(self): + self.wait_until_visible(LoginPageLocators.footer_panel) + if not self.get_elements(LoginPageLocators.submit_button): + self.is_2sv_login = True + print("INFO: 2sv login form") def __init__(self, driver): super().__init__(driver) diff --git a/app/util/k8s/dcapt-snapshots.json b/app/util/k8s/dcapt-snapshots.json index f03970d60..e49b652a3 100644 --- a/app/util/k8s/dcapt-snapshots.json +++ b/app/util/k8s/dcapt-snapshots.json @@ -602,14 +602,14 @@ ] }, { - "version": "9.0.0", + "version": "9.3.0", "data": [ { "type": "ebs", "size": "large", "snapshots": [ { - "us-east-2": "snap-0ac664e91507f0e9d", + "us-east-2": "snap-0a197f5ad51ff7edb", "us-east-1": "snap-0961da714ef84fa67" } ] @@ -619,7 +619,7 @@ "size": "large", "snapshots": [ { - "us-east-2": "arn:aws:rds:us-east-2:585036043680:snapshot:dcapt-bitbucket-9-0-0", + "us-east-2": "arn:aws:rds:us-east-2:585036043680:snapshot:dcapt-bitbucket-9-3-0", "us-east-1": "arn:aws:rds:us-east-1:585036043680:snapshot:dcapt-bitbucket-9-0-0" } ]