Skip to content

Commit ce4ccf2

Browse files
authoredOct 31, 2024
Merge pull request #1612 from atlassian/release/8.5.0
Release 8.5.0
2 parents 216b1b4 + 49564c6 commit ce4ccf2

37 files changed

+1471
-635
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ This repository contains Taurus scripts for performance testing of Atlassian Dat
55

66
## Supported versions
77
* Supported Jira versions:
8-
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `9.12.12` and `9.4.25`
8+
* 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
99

1010
* Supported Jira Service Management versions:
11-
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `5.12.12` and `5.4.25`
11+
* 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
1212

1313
* Supported Confluence versions:
1414
* 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

‎app/bamboo.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ services:
5151
- python util/post_run/cleanup_results_dir.py
5252
- module: pip-install
5353
packages:
54-
- selenium==4.24.0
54+
- selenium==4.25.0
5555
execution:
5656
- scenario: jmeter
5757
executor: jmeter
@@ -121,7 +121,7 @@ modules:
121121
httpsampler.ignore_failed_embedded_resources: "true"
122122
selenium:
123123
chromedriver:
124-
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
124+
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
125125
reporting:
126126
- data-source: sample-labels
127127
module: junit-xml

‎app/bitbucket.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ services:
3737
- python util/post_run/cleanup_results_dir.py
3838
- module: pip-install
3939
packages:
40-
- selenium==4.24.0
40+
- selenium==4.25.0
4141
execution:
4242
- scenario: ${load_executor}
4343
concurrency: ${concurrency}
@@ -87,7 +87,7 @@ modules:
8787
httpsampler.ignore_failed_embedded_resources: "true"
8888
selenium:
8989
chromedriver:
90-
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
90+
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
9191
reporting:
9292
- data-source: sample-labels
9393
module: junit-xml

‎app/confluence.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ services:
5252
- python util/post_run/cleanup_results_dir.py
5353
- module: pip-install
5454
packages:
55-
- selenium==4.24.0
55+
- selenium==4.25.0
5656
execution:
5757
- scenario: ${load_executor}
5858
executor: ${load_executor}
@@ -114,7 +114,7 @@ modules:
114114
httpsampler.ignore_failed_embedded_resources: "true"
115115
selenium:
116116
chromedriver:
117-
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
117+
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
118118
reporting:
119119
- data-source: sample-labels
120120
module: junit-xml

‎app/jira.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ services:
5252
- python util/post_run/cleanup_results_dir.py
5353
- module: pip-install
5454
packages:
55-
- selenium==4.24.0
55+
- selenium==4.25.0
5656
execution:
5757
- scenario: ${load_executor}
5858
executor: ${load_executor}
@@ -115,7 +115,7 @@ modules:
115115
httpsampler.ignore_failed_embedded_resources: "true"
116116
selenium:
117117
chromedriver:
118-
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
118+
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
119119
reporting:
120120
- data-source: sample-labels
121121
module: junit-xml

‎app/jmeter/bamboo.jmx

+506-265
Large diffs are not rendered by default.

‎app/jmeter/confluence.jmx

+352-176
Large diffs are not rendered by default.

‎app/jmeter/jira.jmx

+3-3
Original file line numberDiff line numberDiff line change
@@ -2005,7 +2005,7 @@ if ( sleep_time > 0 ) {
20052005
<boolProp name="TransactionController.includeTimers">false</boolProp>
20062006
</TransactionController>
20072007
<hashTree>
2008-
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="400 /browse/&lt;issue_key&gt;" enabled="true">
2008+
<HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="400 /browse/&lt;issue_key&gt;">
20092009
<stringProp name="HTTPSampler.path">${application.postfix}/browse/${issue_key}</stringProp>
20102010
<boolProp name="HTTPSampler.follow_redirects">true</boolProp>
20112011
<stringProp name="HTTPSampler.method">GET</stringProp>
@@ -2045,10 +2045,10 @@ if ( sleep_time &gt; 0 ) {
20452045
</collectionProp>
20462046
</HeaderManager>
20472047
<hashTree/>
2048-
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="x_issue_id" enabled="true">
2048+
<RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="x_issue_id">
20492049
<stringProp name="RegexExtractor.useHeaders">false</stringProp>
20502050
<stringProp name="RegexExtractor.refname">x_issue_id</stringProp>
2051-
<stringProp name="RegexExtractor.regex">id=&quot;key-val&quot; rel=&quot;(.+?)&quot;&gt;</stringProp>
2051+
<stringProp name="RegexExtractor.regex">id=&quot;key-val&quot; rel=&quot;(\d+)&quot;</stringProp>
20522052
<stringProp name="RegexExtractor.template">$1$</stringProp>
20532053
<stringProp name="RegexExtractor.default">NOT FOUND</stringProp>
20542054
<stringProp name="RegexExtractor.match_number">1</stringProp>

‎app/jmeter/jsm_customers.jmx

+5-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ import org.apache.commons.io.FileUtils;
275275
</elementProp>
276276
</HTTPSamplerProxy>
277277
<hashTree>
278-
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header manager" enabled="true">
278+
<HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header manager">
279279
<collectionProp name="HeaderManager.headers">
280280
<elementProp name="Accept" elementType="Header">
281281
<stringProp name="Header.name">Accept</stringProp>
@@ -289,6 +289,10 @@ import org.apache.commons.io.FileUtils;
289289
<stringProp name="Header.name">Content-Type</stringProp>
290290
<stringProp name="Header.value">application/x-www-form-urlencoded</stringProp>
291291
</elementProp>
292+
<elementProp name="" elementType="Header">
293+
<stringProp name="Header.name">X-Atlassian-Token</stringProp>
294+
<stringProp name="Header.value">no-check</stringProp>
295+
</elementProp>
292296
</collectionProp>
293297
</HeaderManager>
294298
<hashTree/>

‎app/jsm.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ services:
6868
- python util/post_run/cleanup_results_dir.py
6969
- module: pip-install
7070
packages:
71-
- selenium==4.24.0
71+
- selenium==4.25.0
7272
execution:
7373
- scenario: ${load_executor}_agents
7474
executor: ${load_executor}
@@ -167,7 +167,7 @@ modules:
167167
httpsampler.ignore_failed_embedded_resources: "true"
168168
selenium:
169169
chromedriver:
170-
version: "128.0.6613.137" # Supports Chrome version 128. You can refer to https://googlechromelabs.github.io/chrome-for-testing
170+
version: "130.0.6723.91" # Supports Chrome version 130. You can refer to https://googlechromelabs.github.io/chrome-for-testing
171171
reporting:
172172
- data-source: sample-labels
173173
module: junit-xml

‎app/locustio/bamboo/http_actions.py

+40-10
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,50 @@ def locust_bamboo_login(locust):
103103
username = user[0]
104104
password = user[1]
105105

106-
login_body = params.login_body
107-
login_body['os_username'] = username
108-
login_body['os_password'] = password
109-
110-
# login
111-
r = locust.post('/userlogin.action',
112-
login_body,
113-
TEXT_HEADERS,
114-
catch_response=True)
115-
106+
# 10 get userlogin.action
107+
r = locust.get('/userlogin.action', catch_response=True)
108+
content = r.content.decode('utf-8')
109+
is_legacy_login_form = 'loginForm' in content
110+
print(f"Is legacy login form: {is_legacy_login_form}")
111+
logger.locust_info(f"Is legacy login form: {is_legacy_login_form}")
112+
113+
if is_legacy_login_form:
114+
logger.locust_info(f"Legacy login flow for user {username}")
115+
login_body = params.login_body
116+
login_body['os_username'] = username
117+
login_body['os_password'] = password
118+
119+
# login
120+
locust.post('/userlogin.action',
121+
login_body,
122+
TEXT_HEADERS,
123+
catch_response=True)
124+
125+
else:
126+
logger.locust_info(f"2SV login flow for user {username}")
127+
128+
login_body = {'username': username,
129+
'password': password,
130+
'rememberMe': 'True',
131+
'targetUrl': ''
132+
}
133+
134+
headers = {
135+
"Content-Type": "application/json"
136+
}
137+
138+
# 15 /rest/tsv/1.0/authenticate
139+
locust.post('/rest/tsv/1.0/authenticate',
140+
json=login_body,
141+
headers=headers,
142+
catch_response=True)
143+
144+
r = locust.get(url='/', catch_response=True)
116145
content = r.content.decode('utf-8')
117146

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

‎app/locustio/common_utils.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@
5959
"Accept-Encoding": "gzip, deflate",
6060
"Accept": "application/json, text/javascript, */*; q=0.01"
6161
}
62+
JSM_CUSTOMERS_HEADERS = {
63+
'Accept-Language': 'en-US,en;q=0.5',
64+
'Content-Type': 'application/x-www-form-urlencoded',
65+
'Accept-Encoding': 'gzip, deflate',
66+
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
67+
"X-Atlassian-Token": "no-check"
68+
}
6269

6370
JIRA_API_URL = '/'
6471
CONFLUENCE_API_URL = '/'
@@ -122,7 +129,6 @@ class MyBaseTaskSet(TaskSet):
122129
login_failed = False
123130

124131
def failure_check(self, response, action_name):
125-
print(dir(response))
126132
if (hasattr(response, 'error') and response.error) or not response:
127133
if 'login' in action_name:
128134
self.login_failed = True

‎app/locustio/jira/requests_params.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Login(JiraResource):
4242

4343
class BrowseIssue(JiraResource):
4444
action_name = "view_issue"
45-
issue_id_pattern = r'id="key-val" rel="(.+?)">'
45+
issue_id_pattern = r'id="key-val" rel="(.+?)"'
4646
project_avatar_id_pattern = r'projectavatar\?avatarId\=(.+?)" '
4747
edit_allow_pattern = "secure\/EditLabels\!default" # noqa W605
4848
browse_project_payload = {"id": "com.atlassian.jira.jira-projects-issue-navigator:sidebar-issue-navigator"}

‎app/locustio/jsm/customers/customers_http_actions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import random
55

66
from locustio.common_utils import init_logger, jsm_customer_measure, TEXT_HEADERS, RESOURCE_HEADERS, \
7-
generate_random_string
7+
generate_random_string, NO_TOKEN_HEADERS, JSM_CUSTOMERS_HEADERS
88
from locustio.jsm.customers.customers_requests_params import Login, ViewPortal, ViewRequests, ViewRequest, \
99
AddComment, ShareRequest, ShareRequestOrg, CreateRequest, jsm_customer_datasets
1010

@@ -50,7 +50,7 @@ def customer_login_and_view_portals(locust):
5050
r = locust.post(
5151
'/servicedesk/customer/user/login',
5252
body,
53-
TEXT_HEADERS,
53+
headers=JSM_CUSTOMERS_HEADERS,
5454
catch_response=True)
5555

5656
locust.get('/servicedesk/customer/portals', catch_response=True)

‎app/selenium_ui/bamboo/modules.py

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def measure():
2525
@print_timing("selenium_login:open_login_page")
2626
def sub_measure():
2727
login_page.go_to()
28+
login_page.wait_for_page_loaded()
2829

2930
sub_measure()
3031
login_page.set_credentials(username=datasets['username'], password=datasets['password'])

‎app/selenium_ui/bamboo/pages/pages.py

+23-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,32 @@
88
class Login(BasePage):
99
page_url = LoginPageLocators.login_page_url
1010

11+
def __init__(self, driver):
12+
super().__init__(driver)
13+
self.is_2sv_login = False
14+
15+
def wait_for_page_loaded(self):
16+
self.wait_until_visible(LoginPageLocators.login_page_content)
17+
if not self.get_elements(LoginPageLocators.login_button):
18+
self.is_2sv_login = True
19+
self.wait_until_visible(LoginPageLocators.login_button_2sv)
20+
print("INFO: 2sv login form")
21+
1122
def click_login_button(self):
12-
self.wait_until_visible(LoginPageLocators.login_submit_button).click()
13-
self.wait_until_invisible(LoginPageLocators.login_submit_button)
23+
if self.is_2sv_login:
24+
self.wait_until_visible(LoginPageLocators.login_button_2sv).click()
25+
self.wait_until_invisible(LoginPageLocators.login_button_2sv)
26+
else:
27+
self.wait_until_visible(LoginPageLocators.login_button).click()
28+
self.wait_until_invisible(LoginPageLocators.login_button)
1429

1530
def set_credentials(self, username, password):
16-
self.get_element(LoginPageLocators.login_username_field).send_keys(username)
17-
self.get_element(LoginPageLocators.login_password_field).send_keys(password)
31+
if self.is_2sv_login:
32+
self.get_element(LoginPageLocators.login_username_field_2sv).send_keys(username)
33+
self.get_element(LoginPageLocators.login_password_field_2sv).send_keys(password)
34+
else:
35+
self.get_element(LoginPageLocators.login_username_field).send_keys(username)
36+
self.get_element(LoginPageLocators.login_password_field).send_keys(password)
1837

1938

2039
class ProjectList(BasePage):

‎app/selenium_ui/bamboo/pages/selectors.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,18 @@ def logout_url(self):
3434

3535
class LoginPageLocators:
3636
login_page_url = UrlManager().login_url()
37+
38+
login_page_content = (By.ID, "content")
39+
40+
# legacy login form
3741
login_username_field = (By.ID, "loginForm_os_username")
3842
login_password_field = (By.ID, "loginForm_os_password")
39-
login_submit_button = (By.ID, "loginForm_save")
43+
login_button = (By.ID, "loginForm_save")
44+
45+
# 2sv login form
46+
login_button_2sv = (By.ID, "login-button")
47+
login_username_field_2sv = (By.ID, "username-field")
48+
login_password_field_2sv = (By.ID, "password-field")
4049

4150

4251
class AllProjectsLocators:

‎app/selenium_ui/base_page.py

+4
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ def app_version(self):
159159
def generate_random_string(length):
160160
return "".join([random.choice(string.digits + string.ascii_letters + ' ') for _ in range(length)])
161161

162+
@staticmethod
163+
def generate_no_whitespace_string(length):
164+
return "".join([random.choice(string.digits + string.ascii_letters) for _ in range(length)])
165+
162166
def select(self, element):
163167
return Select(element)
164168

‎app/selenium_ui/confluence/modules.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ def cql_search(webdriver, datasets):
310310
@print_timing("selenium_cql_search")
311311
def measure():
312312
page.get_element(PageLocators.search_box).send_keys(random_cql)
313-
page.wait_until_any_ec_presented((PageLocators.empty_search_results, PageLocators.search_results))
313+
page.wait_until_any_ec_presented((PageLocators.empty_search_results, PageLocators.search_results),
314+
timeout=30)
314315
page.get_element(PageLocators.close_search_button).click()
315316
measure()
316317

0 commit comments

Comments
 (0)
Failed to load comments.