Skip to content

Commit c972679

Browse files
authored
Merge pull request atlassian#729 from atlassian/release/5.2.0
Release 5.2.0
2 parents f05089b + 9f8f7f9 commit c972679

35 files changed

+192
-182
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,19 @@ 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): `8.13.10`, `8.5.18`
8+
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `8.13.13`, `8.20.1`
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): `4.13.10`, `4.5.18`
11+
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `4.13.13`, `4.20.1`
1212

1313
* Supported Confluence versions:
14-
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.13.0`, `7.4.11`
14+
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.13.2`, `7.4.13`
1515

1616
* Supported Bitbucket Server versions:
17-
* Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.6.9`, `6.10.13`
18-
* Bitbucket Server Platform release: `7.0.5`
17+
* Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.6.10`, `7.17.1`
1918

2019
* Supported Crowd versions:
21-
* Crowd [Long Term Support release](https://confluence.atlassian.com/crowd/crowd-release-notes-199094.html): `4.3.5`
20+
* Crowd [Long Term Support release](https://confluence.atlassian.com/crowd/crowd-release-notes-199094.html): `4.4.0`
2221

2322
## Support
2423
In case of technical questions, issues or problems with DC Apps Performance Toolkit, contact us for support in the [community Slack](http://bit.ly/dcapt_slack) **#data-center-app-performance-toolkit** channel.

app/bitbucket.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ modules:
8686
httpsampler.ignore_failed_embedded_resources: "true"
8787
selenium:
8888
chromedriver:
89-
version: "93.0.4577.63" # Supports Chrome version 93. You can refer to http://chromedriver.chromium.org/downloads
89+
version: "95.0.4638.69" # Supports Chrome version 95. You can refer to http://chromedriver.chromium.org/downloads
9090
reporting:
9191
- data-source: sample-labels
9292
module: junit-xml

app/confluence.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ modules:
110110
httpsampler.ignore_failed_embedded_resources: "true"
111111
selenium:
112112
chromedriver:
113-
version: "93.0.4577.63" # Supports Chrome version 93. You can refer to http://chromedriver.chromium.org/downloads
113+
version: "95.0.4638.69" # Supports Chrome version 95. You can refer to http://chromedriver.chromium.org/downloads
114114
reporting:
115115
- data-source: sample-labels
116116
module: junit-xml

app/jira.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ modules:
114114
httpsampler.ignore_failed_embedded_resources: "true"
115115
selenium:
116116
chromedriver:
117-
version: "93.0.4577.63" # Supports Chrome version 93. You can refer to http://chromedriver.chromium.org/downloads
117+
version: "95.0.4638.69" # Supports Chrome version 95. You can refer to http://chromedriver.chromium.org/downloads
118118
reporting:
119119
- data-source: sample-labels
120120
module: junit-xml

app/jsm.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ settings:
1111
application_postfix: # e.g. /jira in case of url like http://localhost:2990/jira
1212
admin_login: admin
1313
admin_password: admin
14-
load_executor: jmeter
14+
load_executor: jmeter # jmeter and locust are supported. jmeter by default.
1515
concurrency_agents: 50 # number of concurrent virtual agent users for jmeter or locust scenario
1616
concurrency_customers: 150 # number of concurrent virtual customer users for jmeter or locust scenario
1717
test_duration: 45m
@@ -21,7 +21,7 @@ settings:
2121
WEBDRIVER_VISIBLE: False
2222
JMETER_VERSION: 5.2.1
2323
LANGUAGE: en_US.utf8
24-
allow_analytics: Yes # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README.
24+
allow_analytics: Yes # Allow sending basic run analytics to Atlassian. These analytics help us to understand how the tool is being used and help us to continue to invest in this tooling. For more details please see our README.
2525
# Action percentage for Jmeter and Locust load executors
2626
agent_browse_projects: 10
2727
agent_view_request: 24
@@ -49,6 +49,7 @@ services:
4949
- module: shellexec
5050
prepare:
5151
- python util/pre_run/environment_checker.py
52+
- python util/pre_run/check_for_updates.py
5253
- python util/data_preparation/jsm_prepare_data.py
5354
shutdown:
5455
- python util/post_run/jmeter_post_check.py
@@ -150,7 +151,7 @@ modules:
150151
httpsampler.ignore_failed_embedded_resources: "true"
151152
selenium:
152153
chromedriver:
153-
version: "91.0.4472.101" # Supports Chrome version 91. You can refer to http://chromedriver.chromium.org/downloads
154+
version: "95.0.4638.69" # Supports Chrome version 95. You can refer to http://chromedriver.chromium.org/downloads
154155
reporting:
155156
- data-source: sample-labels
156157
module: junit-xml

app/locustio/common_utils.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -229,18 +229,18 @@ def global_measure(func, start_time, interaction, *args, **kwargs):
229229
except Exception as e:
230230
total = int((time.time() - start_time) * 1000)
231231
print(e)
232-
events.request_failure.fire(request_type="Action",
233-
name=interaction,
234-
response_time=total,
235-
response_length=0,
236-
exception=e)
232+
events.request.fire(request_type="Action",
233+
name=interaction,
234+
response_time=total,
235+
response_length=0,
236+
exception=e)
237237
logger.error(f'{interaction} action failed. Reason: {e}')
238238
else:
239239
total = int((time.time() - start_time) * 1000)
240-
events.request_success.fire(request_type="Action",
241-
name=interaction,
242-
response_time=total,
243-
response_length=0)
240+
events.request.fire(request_type="Action",
241+
name=interaction,
242+
response_time=total,
243+
response_length=0)
244244
logger.info(f'{interaction} is finished successfully')
245245
return result
246246

app/selenium_ui/base_page.py

Lines changed: 33 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
from selenium.webdriver.support.wait import WebDriverWait
2-
from selenium.webdriver.support import expected_conditions as ec
3-
from selenium.webdriver.common.action_chains import ActionChains
4-
from selenium.common.exceptions import WebDriverException
5-
from selenium.webdriver.support.ui import Select
61
import random
72
import string
3+
from collections import OrderedDict
4+
5+
from packaging import version
6+
from selenium.common.exceptions import WebDriverException
7+
from selenium.webdriver.common.action_chains import ActionChains
8+
from selenium.webdriver.support import expected_conditions as ec
9+
from selenium.webdriver.support.ui import Select
10+
from selenium.webdriver.support.wait import WebDriverWait
811

912
TIMEOUT = 20
1013

@@ -30,64 +33,58 @@ def wait_for_page_loaded(self):
3033
def go_to_url(self, url):
3134
self.driver.get(url)
3235

36+
def get_selector(self, selector):
37+
if type(selector) is OrderedDict:
38+
result = next(iter(selector.items()))[1]
39+
for sel_version, sel in selector.items():
40+
selector_version = version.parse(sel_version)
41+
if self.app_version >= selector_version:
42+
result = sel
43+
return result
44+
else:
45+
return selector
46+
3347
def get_element(self, selector):
34-
selector_name = self.get_selector(selector)
35-
by, locator = selector_name[0], selector_name[1]
48+
by, locator = selector[0], selector[1]
3649
return self.driver.find_element(by, locator)
3750

3851
def get_elements(self, selector):
39-
selector_name = self.get_selector(selector)
40-
by, locator = selector_name[0], selector_name[1]
52+
by, locator = selector[0], selector[1]
4153
return self.driver.find_elements(by, locator)
4254

4355
def element_exists(self, selector):
44-
selector_name = self.get_selector(selector)
45-
by, locator = selector_name[0], selector_name[1]
56+
by, locator = selector[0], selector[1]
4657
return True if self.driver.find_elements(by, locator) else False
4758

48-
def wait_until_invisible(self, selector_name, timeout=timeout):
49-
selector = self.get_selector(selector_name)
59+
def wait_until_invisible(self, selector, timeout=timeout):
5060
return self.__wait_until(expected_condition=ec.invisibility_of_element_located(selector), time_out=timeout)
5161

52-
def wait_until_visible(self, selector_name, timeout=timeout):
53-
selector = self.get_selector(selector_name)
62+
def wait_until_visible(self, selector, timeout=timeout):
5463
return self.__wait_until(expected_condition=ec.visibility_of_element_located(selector), time_out=timeout)
5564

56-
def wait_until_available_to_switch(self, selector_name):
57-
selector = self.get_selector(selector_name)
65+
def wait_until_available_to_switch(self, selector):
5866
return self.__wait_until(expected_condition=ec.frame_to_be_available_and_switch_to_it(selector),
5967
time_out=self.timeout)
6068

61-
def wait_until_present(self, selector_name, timeout=timeout):
62-
selector = self.get_selector(selector_name)
69+
def wait_until_present(self, selector, timeout=timeout):
6370
return self.__wait_until(expected_condition=ec.presence_of_element_located(selector), time_out=timeout)
6471

65-
def wait_until_clickable(self, selector_name, timeout=timeout):
66-
selector = self.get_selector(selector_name)
72+
def wait_until_clickable(self, selector, timeout=timeout):
6773
return self.__wait_until(expected_condition=ec.element_to_be_clickable(selector), time_out=timeout)
6874

69-
def wait_until_any_element_visible(self, selector_name, timeout=timeout):
70-
selector = self.get_selector(selector_name)
75+
def wait_until_any_element_visible(self, selector, timeout=timeout):
7176
return self.__wait_until(expected_condition=ec.visibility_of_any_elements_located(selector),
7277
time_out=timeout)
7378

74-
def wait_until_any_ec_presented(self, selector_names, timeout=timeout):
75-
origin_selectors = []
76-
for selector in selector_names:
77-
origin_selectors.append(self.get_selector(selector))
79+
def wait_until_any_ec_presented(self, selectors, timeout=timeout):
7880
any_ec = AnyEc()
79-
any_ec.ecs = tuple(ec.presence_of_element_located(origin_selector) for origin_selector in origin_selectors)
81+
any_ec.ecs = tuple(ec.presence_of_element_located(selector) for selector in selectors)
8082
return self.__wait_until(expected_condition=any_ec, time_out=timeout)
8183

82-
def wait_until_any_ec_text_presented_in_el(self, selector_names, timeout=timeout):
83-
origin_selectors = []
84-
for selector_text in selector_names:
85-
selector = self.get_selector(selector_text[0])
86-
text = selector_text[1]
87-
origin_selectors.append((selector, text))
84+
def wait_until_any_ec_text_presented_in_el(self, selector_text_list, timeout=timeout):
8885
any_ec = AnyEc()
89-
any_ec.ecs = tuple(ec.text_to_be_present_in_element(locator=origin_selector[0], text_=origin_selector[1]) for
90-
origin_selector in origin_selectors)
86+
any_ec.ecs = tuple(ec.text_to_be_present_in_element(locator=selector_text[0], text_=selector_text[1]) for
87+
selector_text in selector_text_list)
9188
return self.__wait_until(expected_condition=any_ec, time_out=timeout)
9289

9390
def __wait_until(self, expected_condition, time_out=timeout):
@@ -124,12 +121,6 @@ def dismiss_popup(self, *args):
124121
def return_to_parent_frame(self):
125122
return self.driver.switch_to.parent_frame()
126123

127-
def get_selector(self, selector_name):
128-
selector = selector_name.get(self.app_version) if type(selector_name) == dict else selector_name
129-
if selector is None:
130-
raise Exception(f'Selector {selector_name} for version {self.app_version} is not found')
131-
return selector
132-
133124
def execute_js(self, js):
134125
return self.driver.execute_script(js)
135126

app/selenium_ui/bitbucket/modules.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def measure():
2727
@print_timing("selenium_login:open_login_page")
2828
def sub_measure():
2929
login_page.go_to()
30-
webdriver.app_version = login_page.get_app_major_version()
3130
if login_page.is_logged_in():
3231
login_page.delete_all_cookies()
3332
login_page.go_to()

app/selenium_ui/bitbucket/pages/pages.py

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class PopupManager(BasePage):
9393

9494
def dismiss_default_popup(self):
9595
return self.dismiss_popup(PopupLocators.default_popup, PopupLocators.popup_1, PopupLocators.popup_2,
96-
PopupLocators.popup_3)
96+
PopupLocators.popup_3, PopupLocators.popup_4)
9797

9898

9999
class Repository(BasePage):
@@ -202,7 +202,7 @@ def wait_for_commits_tab(self, ):
202202
self.wait_until_any_element_visible(PullRequestLocator.commit_message_label)
203203

204204
def click_inline_comment_button_js(self):
205-
selector = self.get_selector(PullRequestLocator.inline_comment_button)
205+
selector = PullRequestLocator.inline_comment_button
206206
self.execute_js(f"elems=document.querySelectorAll('{selector[1]}'); "
207207
"item=elems[Math.floor(Math.random() * elems.length)];"
208208
"item.scrollIntoView();"
@@ -211,22 +211,10 @@ def click_inline_comment_button_js(self):
211211
def wait_for_comment_text_area(self):
212212
return self.wait_until_visible(PullRequestLocator.comment_text_area)
213213

214-
def add_code_comment_v6(self):
215-
self.wait_for_comment_text_area()
216-
selector = self.get_selector(PullRequestLocator.comment_text_area)
217-
self.execute_js(f"document.querySelector('{selector[1]}').value = 'Comment from Selenium script';")
218-
self.click_save_comment_button()
219-
220-
def add_code_comment_v7(self):
214+
def add_code_comment(self, ):
221215
self.wait_until_visible(PullRequestLocator.text_area).send_keys('Comment from Selenium script')
222216
self.click_save_comment_button()
223217

224-
def add_code_comment(self, ):
225-
if self.app_version == '6':
226-
self.add_code_comment_v6()
227-
elif self.app_version == '7':
228-
self.add_code_comment_v7()
229-
230218
def click_save_comment_button(self):
231219
return self.wait_until_visible(PullRequestLocator.comment_button).click()
232220

@@ -238,13 +226,14 @@ def wait_merge_button_clickable(self):
238226
self.wait_until_clickable(PullRequestLocator.pull_request_page_merge_button)
239227

240228
def merge_pull_request(self):
241-
if self.driver.app_version == '6':
242-
if self.get_elements(PullRequestLocator.merge_spinner):
243-
self.wait_until_invisible(PullRequestLocator.merge_spinner)
244229
self.wait_until_present(PullRequestLocator.pull_request_page_merge_button).click()
245230
PopupManager(self.driver).dismiss_default_popup()
246231
self.wait_until_visible(PullRequestLocator.diagram_selector)
247-
self.execute_js(f'document.querySelector("{PullRequestLocator.delete_branch_per_merge_checkbox[1]}").click()')
232+
self.wait_until_visible(PullRequestLocator.merge_diagram_selector)
233+
self.wait_until_present(PullRequestLocator.delete_branch_per_merge_checkbox)
234+
if self.get_element(PullRequestLocator.delete_branch_per_merge_checkbox).is_selected():
235+
self.execute_js(f'document.querySelector('
236+
f'"{PullRequestLocator.delete_branch_per_merge_checkbox[1]}").click()')
248237
self.wait_until_clickable(PullRequestLocator.pull_request_modal_merge_button).click()
249238
self.wait_until_invisible(PullRequestLocator.del_branch_checkbox_selector)
250239

@@ -275,7 +264,7 @@ def delete_branch(self, branch_name):
275264
self.wait_until_visible(BranchesLocator.branches_name)
276265
self.wait_until_visible(BranchesLocator.search_branch_action).click()
277266
self.execute_js("document.querySelector('li>a.delete-branch').click()")
278-
self.wait_until_clickable(BranchesLocator.delete_branch_diaglog_submit).click()
267+
self.wait_until_clickable(BranchesLocator.delete_branch_dialog_submit).click()
279268

280269

281270
class RepositorySettings(BasePage):

0 commit comments

Comments
 (0)