Skip to content

Commit

Permalink
Merge pull request #859 from atlassian/release/6.3.0
Browse files Browse the repository at this point in the history
Release 6.3.0
  • Loading branch information
ometelytsia committed Aug 2, 2022
2 parents c315a75 + f989fce commit a26b146
Show file tree
Hide file tree
Showing 34 changed files with 172 additions and 168 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ 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): `8.13.20`, `8.20.8`
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `8.20.10`, `9.0.0`

* Supported Jira Service Management versions:
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `4.13.20`, `4.20.8`
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `4.20.10`, `5.0.0`

* Supported Confluence versions:
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.13.7`, `7.4.17`
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.13.7`

* Supported Bitbucket Server versions:
* Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.6.14`, `7.17.6`
Expand Down
2 changes: 1 addition & 1 deletion app/bamboo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "102.0.5005.61" # Supports Chrome version 102. You can refer to http://chromedriver.chromium.org/downloads
version: "103.0.5060.134" # Supports Chrome version 103. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
2 changes: 1 addition & 1 deletion app/bitbucket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "102.0.5005.61" # Supports Chrome version 102. You can refer to http://chromedriver.chromium.org/downloads
version: "103.0.5060.134" # Supports Chrome version 103. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
2 changes: 1 addition & 1 deletion app/confluence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "102.0.5005.61" # Supports Chrome version 102. You can refer to http://chromedriver.chromium.org/downloads
version: "103.0.5060.134" # Supports Chrome version 103. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
2 changes: 1 addition & 1 deletion app/jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "102.0.5005.61" # Supports Chrome version 102. You can refer to http://chromedriver.chromium.org/downloads
version: "103.0.5060.134" # Supports Chrome version 103. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
10 changes: 7 additions & 3 deletions app/jmeter/jira.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,10 @@ JMeterUtils.setProperty("c_AtlToken" + user_counter, atl_token)
<stringProp name="Header.name">Accept</stringProp>
<stringProp name="Header.value">*/*</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 Expand Up @@ -6905,7 +6909,7 @@ if ( sleep_time &gt; 0 ) {
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;id&quot;:&quot;com.pyxis.greenhopper.jira:project-sidebar-work-${x_project_plan}&quot;}&#xd;
<stringProp name="Argument.value">{&quot;id&quot;:&quot;com.pyxis.greenhopper.jira:project-sidebar-work-kanban&quot;}&#xd;
</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
Expand Down Expand Up @@ -7713,7 +7717,7 @@ if ( sleep_time &gt; 0 ) {
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;id&quot;:&quot;com.pyxis.greenhopper.jira:project-sidebar-work-${x_project_plan}&quot;}&#xd;
<stringProp name="Argument.value">{&quot;id&quot;:&quot;com.pyxis.greenhopper.jira:project-sidebar-work-scrum&quot;}&#xd;
</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
Expand Down Expand Up @@ -8724,7 +8728,7 @@ if ( sleep_time &gt; 0 ) {
<collectionProp name="Arguments.arguments">
<elementProp name="" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">false</boolProp>
<stringProp name="Argument.value">{&quot;id&quot;:&quot;com.pyxis.greenhopper.jira:project-sidebar-work-${x_project_plan}&quot;}&#xd;
<stringProp name="Argument.value">{&quot;id&quot;:&quot;com.pyxis.greenhopper.jira:project-sidebar-work-scrum&quot;}&#xd;
</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
Expand Down
2 changes: 1 addition & 1 deletion app/jsm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "102.0.5005.61" # Supports Chrome version 102. You can refer to http://chromedriver.chromium.org/downloads
version: "103.0.5060.134" # Supports Chrome version 103. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
8 changes: 7 additions & 1 deletion app/locustio/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@
'X-AUSERNAME': 'admin',
'X-Requested-With': 'XMLHttpRequest',
'Accept-Encoding': 'gzip, deflate',
'Accept': '*/*'
'Accept': '*/*',
'X-Atlassian-Token': 'no-check',
'Content-Length': '0',
'Connection': 'keep-alive',
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'User-Agent': 'xx',
'Authorization': 'Basic'
}
NO_TOKEN_HEADERS = {
"Accept-Language": "en-US,en;q=0.5",
Expand Down
10 changes: 5 additions & 5 deletions app/locustio/jira/http_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ def create_issue_open_quick_create():
raise_if_login_failed(locust)

# 200 /secure/QuickCreateIssue!default.jspa?decorator=none
r = locust.post('/secure/QuickCreateIssue!default.jspa?decorator=none', ADMIN_HEADERS, catch_response=True)
r = locust.post(f'/secure/QuickCreateIssue!default.jspa?',
json={'atl_token': locust.session_data_storage["token"]},
headers=ADMIN_HEADERS, catch_response=True)

content = r.content.decode('utf-8')
atl_token = fetch_by_re(params.atl_token_pattern, content)
Expand All @@ -193,7 +195,7 @@ def create_issue_open_quick_create():
# 205 /rest/quickedit/1.0/userpreferences/create
locust.post('/rest/quickedit/1.0/userpreferences/create',
json=params.user_preferences_payload,
headers=ADMIN_HEADERS,
headers=RESOURCE_HEADERS,
catch_response=True)

# 210 /rest/analytics/1.0/publish/bulk
Expand Down Expand Up @@ -513,6 +515,7 @@ def edit_issue_save_edit():
json=params.resources_body.get("770"),
headers=RESOURCE_HEADERS,
catch_response=True)

edit_issue_save_edit()


Expand Down Expand Up @@ -749,7 +752,6 @@ def view_backlog(locust):

@jira_measure('locust_browse_boards')
def browse_boards(locust):

raise_if_login_failed(locust)
params = BrowseBoards()

Expand Down Expand Up @@ -860,7 +862,6 @@ def kanban_board(locust, board_id):


def scrum_board(locust, board_id):

params = ViewBoard(action_name='view_scrum_board')

# 1100 /secure/RapidBoard.jspa
Expand Down Expand Up @@ -951,7 +952,6 @@ def scrum_board(locust, board_id):


def backlog_board(locust, board_id):

params = ViewBoard(action_name='view_backlog')

# 1200 /secure/RapidBoard.jspa
Expand Down
5 changes: 3 additions & 2 deletions app/locustio/jira/requests_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,20 @@ def jira_datasets():


class JiraResource(BaseResource):

def __init__(self, resource_file='locustio/jira/resources.json'):
super().__init__(resource_file)


class Login(JiraResource):
action_name = 'login_and_view_dashboard'
atl_token_pattern = r'name="atlassian-token" content="(.+?)">'

login_body = {
'os_username': '',
'os_password': '',
'os_destination': '',
'os_cookie': True,
'user_role': '',
'atl_token': '',
'login': 'Log in'
Expand Down Expand Up @@ -162,5 +164,4 @@ def __init__(self, action_name):


class BrowseBoards(JiraResource):

action_name = 'browse_boards'
6 changes: 0 additions & 6 deletions app/selenium_ui/jsm/modules_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,6 @@ def sub_measure():

sub_measure()

@print_timing(f'selenium_agent_view_queues_{project_size}_project:random_choice_queue')
def sub_measure():
browse_queue_page.get_random_queue()

sub_measure()

measure()


Expand Down
13 changes: 1 addition & 12 deletions app/selenium_ui/jsm/pages/agent_pages.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import random

from selenium_ui.base_page import BasePage
from selenium.webdriver.common.keys import Keys
from selenium_ui.jsm.pages.agent_selectors import LoginPageLocators, PopupLocators, DashboardLocators, LogoutLocators, \
Expand Down Expand Up @@ -114,6 +112,7 @@ def check_comment_text_is_displayed(self, text, rte_status=None):

def add_request_comment(self, rte_status):
comment_text = f"Add comment from selenium - {self.generate_random_string(30)}"
self.wait_until_visible(ViewCustomerRequestLocators.customers_sidebar_selector)
textarea = self.get_element(ViewCustomerRequestLocators.comment_collapsed_textarea)
self.driver.execute_script("arguments[0].scrollIntoView(true);", textarea)
textarea.click()
Expand Down Expand Up @@ -189,16 +188,6 @@ def wait_for_page_loaded(self):
self.wait_until_any_ec_presented(
selectors=[ViewQueueLocators.queues_status, ViewQueueLocators.queue_is_empty], timeout=self.timeout)

def get_random_queue(self):
if not self.get_elements(ViewQueueLocators.queue_is_empty):
queues = self.get_elements(ViewQueueLocators.queues)
random_queue = random.choice([queue for queue in queues
if queue.text.partition('\n')[0] not in
['All open', 'Recently resolved', 'Resolved past 7 days']
and queue.text.partition('\n')[2] != '0'])
random_queue.click()
self.wait_until_present(ViewQueueLocators.queues_status, timeout=self.timeout)


class InsightLogin(BasePage):

Expand Down
16 changes: 4 additions & 12 deletions app/selenium_ui/jsm/pages/agent_selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class LoginPageLocators:

class DashboardLocators:
dashboard_url = UrlManager().dashboard_url()
dashboard_params = UrlManager().dashboard_params
dashboard_window = (By.CLASS_NAME, "page-type-dashboard")


Expand All @@ -114,22 +113,15 @@ class ViewCustomerRequestLocators:
comment_text_field = (By.XPATH, "//textarea[@id='comment']")
comment_tinymce_field = (By.ID, "tinymce")
comment_internally_btn = (By.XPATH, "//button[contains(text(),'Comment internally')]")
customers_sidebar_selector = (By.CSS_SELECTOR, 'span.aui-icon.aui-icon-large.sd-sidebar-icon.icon-sidebar-customers')


class ViewReportsLocators:
# locators to click
workload = (By.XPATH, "//span[contains(text(),'Workload')]")
time_to_resolution = (By.XPATH, "//span[contains(text(),'Time to resolution')]")
created_vs_resolved = (By.XPATH, "//span[contains(text(),'Created vs Resolved')]")

# wait until visible locators
reports_nav = (By.ID, "pinnednav-opts-sd-reports-nav")
custom_report_content = (By.CSS_SELECTOR, "#sd-report-content .js-report-graph.sd-graph-container")
team_workload_agents_table = (By.CSS_SELECTOR, ".js-page-panel-content.sd-page-panel-content .aui.sd-agents-table")


class ViewQueueLocators:
queues = (By.CSS_SELECTOR, "#pinnednav-opts-sd-queues-nav li")
queues_status = (By.XPATH, "//span[contains(text(),'Status')]")
queue_is_empty = (By.CSS_SELECTOR, '.sd-queue-empty')

Expand All @@ -145,7 +137,7 @@ class InsightNewSchemaLocators:

@staticmethod
def get_new_object_schema_name_locator(name):
return (By.XPATH, f"//a[contains(text(),'{name}')]")
return By.XPATH, f"//a[contains(text(),'{name}')]"


class InsightDeleteSchemaLocators:
Expand All @@ -155,11 +147,11 @@ class InsightDeleteSchemaLocators:

@staticmethod
def new_object_schema_id_locator(schema_id):
return (By.CSS_SELECTOR, f"a[aria-owns='rlabs-actions-{schema_id}")
return By.CSS_SELECTOR, f"a[aria-owns='rlabs-actions-{schema_id}"

@staticmethod
def new_object_schema_delete_button_locator(name):
return (By.ID, f"object-schema-delete-{name}")
return By.ID, f"object-schema-delete-{name}"


class InsightNewObjectLocators:
Expand Down
5 changes: 4 additions & 1 deletion app/util/analytics/analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def __init__(self, application: BaseApplication):
self.dataset_information = application.dataset_information
if self.app_type != CROWD:
self.processors = application.processors
self.deployment = application.deployment
# JSM(INSIGHT) app type has additional concurrency fields: concurrency_agents, concurrency_customers
if self.app_type == INSIGHT:
self.concurrency_agents = self.conf.agents_concurrency
Expand All @@ -68,6 +69,7 @@ def __init__(self, application: BaseApplication):
self.crowd_sync_test = get_crowd_sync_test_results(bzt_log)
self.ramp_up = application.config.ramp_up
self.total_actions_per_hour = application.config.total_actions_per_hour
self.deployment = 'other'
if self.app_type == BAMBOO:
self.parallel_plans_count = application.config.parallel_plans_count
self.locust_log = LocustFileReader()
Expand Down Expand Up @@ -214,7 +216,8 @@ def send_analytics(collector: AnalyticsCollector):
"selenium_test_rates": collector.selenium_test_rates,
"jmeter_test_rates": collector.jmeter_test_rates,
"locust_test_rates": collector.locust_test_rates,
"concurrency": collector.concurrency
"concurrency": collector.concurrency,
"deployment": collector.deployment
}
r = requests.post(url=f'{BASE_URL}', json=payload, headers=headers)
print(r.json())
Expand Down
1 change: 1 addition & 0 deletions app/util/analytics/analytics_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def generate_report_summary(collector):
summary_report.append(f'Application nodes count|{collector.nodes_count}')
if not collector.app_type == CROWD:
summary_report.append(f'Available Processors|{collector.processors}')
summary_report.append(f'Deployment|{collector.deployment}')
summary_report.append(f'Concurrency|{collector.concurrency}')
summary_report.append(f'Expected test run duration from yml file|{collector.duration} sec')
summary_report.append(f'Actual test run duration|{collector.actual_duration} sec')
Expand Down
4 changes: 4 additions & 0 deletions app/util/analytics/application_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ def locust_default_actions(self):
def processors(self):
return self.client.get_available_processors()

@property
def deployment(self):
return self.client.get_deployment_type()


class Jira(BaseApplication):
type = JIRA
Expand Down
6 changes: 6 additions & 0 deletions app/util/api/bamboo_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,9 @@ def get_nodes_count(self):
r = self.get(f'{self.host}/rest/api/latest/server/nodes', error_msg="Could not get Bamboo nodes count")
return len(r.json()["nodeStatuses"])

def get_deployment_type(self):
bamboo_system_info_html = self._session.get(f'{self.host}/admin/systemInfo.action').content.decode("utf-8")
html_pattern = 'com.atlassian.dcapt.deployment=terraform'
if bamboo_system_info_html.count(html_pattern):
return 'terraform'
return 'other'
7 changes: 7 additions & 0 deletions app/util/api/bitbucket_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,10 @@ def get_user_global_permissions(self, user=''):
api_url = f'{self.host}/rest/api/1.0/admin/permissions/users?filter={user}'
response = self.get(api_url, "Could not get user global permissions")
return response.json()

def get_deployment_type(self):
html_pattern = 'com.atlassian.dcapt.deployment=terraform'
bitbucket_system_page = self.get_bitbucket_system_page().content.decode("utf-8")
if bitbucket_system_page.count(html_pattern):
return 'terraform'
return 'other'
Loading

0 comments on commit a26b146

Please sign in to comment.