Skip to content

Commit

Permalink
Merge pull request #1612 from atlassian/release/8.5.0
Browse files Browse the repository at this point in the history
Release 8.5.0
  • Loading branch information
ometelytsia authored Oct 31, 2024
2 parents 216b1b4 + 49564c6 commit ce4ccf2
Show file tree
Hide file tree
Showing 37 changed files with 1,471 additions and 635 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ This repository contains Taurus scripts for performance testing of Atlassian Dat

## Supported versions
* Supported Jira versions:
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `9.12.12` and `9.4.25`
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `9.12.12`, `9.4.25` and `10.0.1` Platform release

* Supported Jira Service Management versions:
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `5.12.12` and `5.4.25`
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `5.12.12`, `5.4.25` and `10.0.1` Platform release

* Supported Confluence versions:
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `8.5.14`, `7.19.26` and `9.0.2` Platform release
Expand Down
4 changes: 2 additions & 2 deletions app/bamboo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ services:
- python util/post_run/cleanup_results_dir.py
- module: pip-install
packages:
- selenium==4.24.0
- selenium==4.25.0
execution:
- scenario: jmeter
executor: jmeter
Expand Down Expand Up @@ -121,7 +121,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
4 changes: 2 additions & 2 deletions app/bitbucket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
- python util/post_run/cleanup_results_dir.py
- module: pip-install
packages:
- selenium==4.24.0
- selenium==4.25.0
execution:
- scenario: ${load_executor}
concurrency: ${concurrency}
Expand Down Expand Up @@ -87,7 +87,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
4 changes: 2 additions & 2 deletions app/confluence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ services:
- python util/post_run/cleanup_results_dir.py
- module: pip-install
packages:
- selenium==4.24.0
- selenium==4.25.0
execution:
- scenario: ${load_executor}
executor: ${load_executor}
Expand Down Expand Up @@ -114,7 +114,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
Expand Down
4 changes: 2 additions & 2 deletions app/jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ services:
- python util/post_run/cleanup_results_dir.py
- module: pip-install
packages:
- selenium==4.24.0
- selenium==4.25.0
execution:
- scenario: ${load_executor}
executor: ${load_executor}
Expand Down Expand Up @@ -115,7 +115,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
771 changes: 506 additions & 265 deletions app/jmeter/bamboo.jmx

Large diffs are not rendered by default.

528 changes: 352 additions & 176 deletions app/jmeter/confluence.jmx

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions app/jmeter/jira.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ if ( sleep_time > 0 ) {
<boolProp name="TransactionController.includeTimers">false</boolProp>
</TransactionController>
<hashTree>
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="400 /browse/&lt;issue_key&gt;" enabled="true">
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="400 /browse/&lt;issue_key&gt;">
<stringProp name="HTTPSampler.path">${application.postfix}/browse/${issue_key}</stringProp>
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
<stringProp name="HTTPSampler.method">GET</stringProp>
Expand Down Expand Up @@ -2045,10 +2045,10 @@ if ( sleep_time &gt; 0 ) {
</collectionProp>
</HeaderManager>
<hashTree/>
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="x_issue_id" enabled="true">
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="x_issue_id">
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
<stringProp name="RegexExtractor.refname">x_issue_id</stringProp>
<stringProp name="RegexExtractor.regex">id=&quot;key-val&quot; rel=&quot;(.+?)&quot;&gt;</stringProp>
<stringProp name="RegexExtractor.regex">id=&quot;key-val&quot; rel=&quot;(\d+)&quot;</stringProp>
<stringProp name="RegexExtractor.template">$1$</stringProp>
<stringProp name="RegexExtractor.default">NOT FOUND</stringProp>
<stringProp name="RegexExtractor.match_number">1</stringProp>
Expand Down
6 changes: 5 additions & 1 deletion app/jmeter/jsm_customers.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ import org.apache.commons.io.FileUtils;
</elementProp>
</HTTPSamplerProxy>
<hashTree>
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header manager" enabled="true">
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header manager">
<collectionProp name="HeaderManager.headers">
<elementProp name="Accept" elementType="Header">
<stringProp name="Header.name">Accept</stringProp>
Expand All @@ -289,6 +289,10 @@ import org.apache.commons.io.FileUtils;
<stringProp name="Header.name">Content-Type</stringProp>
<stringProp name="Header.value">application/x-www-form-urlencoded</stringProp>
</elementProp>
<elementProp name="" elementType="Header">
<stringProp name="Header.name">X-Atlassian-Token</stringProp>
<stringProp name="Header.value">no-check</stringProp>
</elementProp>
</collectionProp>
</HeaderManager>
<hashTree/>
Expand Down
4 changes: 2 additions & 2 deletions app/jsm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ services:
- python util/post_run/cleanup_results_dir.py
- module: pip-install
packages:
- selenium==4.24.0
- selenium==4.25.0
execution:
- scenario: ${load_executor}_agents
executor: ${load_executor}
Expand Down Expand Up @@ -167,7 +167,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
50 changes: 40 additions & 10 deletions app/locustio/bamboo/http_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,50 @@ def locust_bamboo_login(locust):
username = user[0]
password = user[1]

login_body = params.login_body
login_body['os_username'] = username
login_body['os_password'] = password

# login
r = locust.post('/userlogin.action',
login_body,
TEXT_HEADERS,
catch_response=True)

# 10 get userlogin.action
r = locust.get('/userlogin.action', catch_response=True)
content = r.content.decode('utf-8')
is_legacy_login_form = 'loginForm' in content
print(f"Is legacy login form: {is_legacy_login_form}")
logger.locust_info(f"Is legacy login form: {is_legacy_login_form}")

if is_legacy_login_form:
logger.locust_info(f"Legacy login flow for user {username}")
login_body = params.login_body
login_body['os_username'] = username
login_body['os_password'] = password

# login
locust.post('/userlogin.action',
login_body,
TEXT_HEADERS,
catch_response=True)

else:
logger.locust_info(f"2SV login flow for user {username}")

login_body = {'username': username,
'password': password,
'rememberMe': 'True',
'targetUrl': ''
}

headers = {
"Content-Type": "application/json"
}

# 15 /rest/tsv/1.0/authenticate
locust.post('/rest/tsv/1.0/authenticate',
json=login_body,
headers=headers,
catch_response=True)

r = locust.get(url='/', catch_response=True)
content = r.content.decode('utf-8')

if 'Log Out' not in content:
logger.error(f'Login with {username}, {password} failed: {content}')
print(f'Login with {username}, {password} failed: {content}')
assert 'Log Out' in content, 'User authentication failed.'
logger.locust_info(f'User {username} is successfully logged in')

Expand Down
8 changes: 7 additions & 1 deletion app/locustio/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
"Accept-Encoding": "gzip, deflate",
"Accept": "application/json, text/javascript, */*; q=0.01"
}
JSM_CUSTOMERS_HEADERS = {
'Accept-Language': 'en-US,en;q=0.5',
'Content-Type': 'application/x-www-form-urlencoded',
'Accept-Encoding': 'gzip, deflate',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
"X-Atlassian-Token": "no-check"
}

JIRA_API_URL = '/'
CONFLUENCE_API_URL = '/'
Expand Down Expand Up @@ -122,7 +129,6 @@ class MyBaseTaskSet(TaskSet):
login_failed = False

def failure_check(self, response, action_name):
print(dir(response))
if (hasattr(response, 'error') and response.error) or not response:
if 'login' in action_name:
self.login_failed = True
Expand Down
2 changes: 1 addition & 1 deletion app/locustio/jira/requests_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Login(JiraResource):

class BrowseIssue(JiraResource):
action_name = "view_issue"
issue_id_pattern = r'id="key-val" rel="(.+?)">'
issue_id_pattern = r'id="key-val" rel="(.+?)"'
project_avatar_id_pattern = r'projectavatar\?avatarId\=(.+?)" '
edit_allow_pattern = "secure\/EditLabels\!default" # noqa W605
browse_project_payload = {"id": "com.atlassian.jira.jira-projects-issue-navigator:sidebar-issue-navigator"}
Expand Down
4 changes: 2 additions & 2 deletions app/locustio/jsm/customers/customers_http_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import random

from locustio.common_utils import init_logger, jsm_customer_measure, TEXT_HEADERS, RESOURCE_HEADERS, \
generate_random_string
generate_random_string, NO_TOKEN_HEADERS, JSM_CUSTOMERS_HEADERS
from locustio.jsm.customers.customers_requests_params import Login, ViewPortal, ViewRequests, ViewRequest, \
AddComment, ShareRequest, ShareRequestOrg, CreateRequest, jsm_customer_datasets

Expand Down Expand Up @@ -50,7 +50,7 @@ def customer_login_and_view_portals(locust):
r = locust.post(
'/servicedesk/customer/user/login',
body,
TEXT_HEADERS,
headers=JSM_CUSTOMERS_HEADERS,
catch_response=True)

locust.get('/servicedesk/customer/portals', catch_response=True)
Expand Down
1 change: 1 addition & 0 deletions app/selenium_ui/bamboo/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def measure():
@print_timing("selenium_login:open_login_page")
def sub_measure():
login_page.go_to()
login_page.wait_for_page_loaded()

sub_measure()
login_page.set_credentials(username=datasets['username'], password=datasets['password'])
Expand Down
27 changes: 23 additions & 4 deletions app/selenium_ui/bamboo/pages/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,32 @@
class Login(BasePage):
page_url = LoginPageLocators.login_page_url

def __init__(self, driver):
super().__init__(driver)
self.is_2sv_login = False

def wait_for_page_loaded(self):
self.wait_until_visible(LoginPageLocators.login_page_content)
if not self.get_elements(LoginPageLocators.login_button):
self.is_2sv_login = True
self.wait_until_visible(LoginPageLocators.login_button_2sv)
print("INFO: 2sv login form")

def click_login_button(self):
self.wait_until_visible(LoginPageLocators.login_submit_button).click()
self.wait_until_invisible(LoginPageLocators.login_submit_button)
if self.is_2sv_login:
self.wait_until_visible(LoginPageLocators.login_button_2sv).click()
self.wait_until_invisible(LoginPageLocators.login_button_2sv)
else:
self.wait_until_visible(LoginPageLocators.login_button).click()
self.wait_until_invisible(LoginPageLocators.login_button)

def set_credentials(self, username, password):
self.get_element(LoginPageLocators.login_username_field).send_keys(username)
self.get_element(LoginPageLocators.login_password_field).send_keys(password)
if self.is_2sv_login:
self.get_element(LoginPageLocators.login_username_field_2sv).send_keys(username)
self.get_element(LoginPageLocators.login_password_field_2sv).send_keys(password)
else:
self.get_element(LoginPageLocators.login_username_field).send_keys(username)
self.get_element(LoginPageLocators.login_password_field).send_keys(password)


class ProjectList(BasePage):
Expand Down
11 changes: 10 additions & 1 deletion app/selenium_ui/bamboo/pages/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,18 @@ def logout_url(self):

class LoginPageLocators:
login_page_url = UrlManager().login_url()

login_page_content = (By.ID, "content")

# legacy login form
login_username_field = (By.ID, "loginForm_os_username")
login_password_field = (By.ID, "loginForm_os_password")
login_submit_button = (By.ID, "loginForm_save")
login_button = (By.ID, "loginForm_save")

# 2sv login form
login_button_2sv = (By.ID, "login-button")
login_username_field_2sv = (By.ID, "username-field")
login_password_field_2sv = (By.ID, "password-field")


class AllProjectsLocators:
Expand Down
4 changes: 4 additions & 0 deletions app/selenium_ui/base_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ def app_version(self):
def generate_random_string(length):
return "".join([random.choice(string.digits + string.ascii_letters + ' ') for _ in range(length)])

@staticmethod
def generate_no_whitespace_string(length):
return "".join([random.choice(string.digits + string.ascii_letters) for _ in range(length)])

def select(self, element):
return Select(element)

Expand Down
3 changes: 2 additions & 1 deletion app/selenium_ui/confluence/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ def cql_search(webdriver, datasets):
@print_timing("selenium_cql_search")
def measure():
page.get_element(PageLocators.search_box).send_keys(random_cql)
page.wait_until_any_ec_presented((PageLocators.empty_search_results, PageLocators.search_results))
page.wait_until_any_ec_presented((PageLocators.empty_search_results, PageLocators.search_results),
timeout=30)
page.get_element(PageLocators.close_search_button).click()
measure()

Expand Down
Loading

0 comments on commit ce4ccf2

Please sign in to comment.