Skip to content

Commit

Permalink
Merge pull request #341 from atlassian/release/3.2.0
Browse files Browse the repository at this point in the history
Release/3.2.0
  • Loading branch information
ometelytsia committed Oct 15, 2020
2 parents 9865757 + 5812968 commit 8651a33
Show file tree
Hide file tree
Showing 48 changed files with 2,277 additions and 2,154 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ 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): 7.13.15 and 8.5.6
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 7.13.15 and 8.5.8
* Jira Platform release: 8.0.3

* Supported Confluence versions:
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.13
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.13 and 7.4.4
* Confluence Platform release: 7.0.5

* Supported Bitbucket Server versions:
Expand Down
4 changes: 3 additions & 1 deletion app/bitbucket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ settings:
application_hostname: test_bitbucket_instance.atlassian.com # Bitbucket DC hostname without protocol and port e.g. test-bitbucket.atlassian.com or localhost
application_protocol: http # http or https
application_port: 80 # 80, 443, 8080, 7990 etc
secure: True # Set False to allow insecure connections, e.g. when using self-signed SSL certificate
application_postfix: # e.g. /bitbucket in case of url like http://localhost:7990/bitbucket
admin_login: admin
admin_password: admin
Expand All @@ -17,6 +18,7 @@ settings:
total_actions_per_hour: 32700
WEBDRIVER_VISIBLE: False
JMETER_VERSION: 5.2.1
LANGUAGE: en_US.utf8
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.
services:
- module: shellexec
Expand Down Expand Up @@ -83,7 +85,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "84.0.4147.30" # Supports Chrome version 84. You can refer to http://chromedriver.chromium.org/downloads
version: "86.0.4240.22" # Supports Chrome version 86. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
10 changes: 7 additions & 3 deletions app/confluence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@ settings:
application_hostname: test_confluence_instance.atlassian.com # Confluence DC hostname without protocol and port e.g. test-confluence.atlassian.com or localhost
application_protocol: http # http or https
application_port: 80 # 80, 443, 8080, 1990, etc
secure: True # Set False to allow insecure connections, e.g. when using self-signed SSL certificate
application_postfix: # e.g. /confluence in case of url like http://localhost:1990/confluence
admin_login: admin
admin_password: admin
load_executor: jmeter # jmeter and locust are supported. jmeter by default.
concurrency: 200 # number of concurrent virtual users for jmeter or locust scenario
test_duration: 45m
ramp-up: 3m # time to spin all concurrent users
ramp-up: 5m # time to spin all concurrent users
total_actions_per_hour: 20000
WEBDRIVER_VISIBLE: False
JMETER_VERSION: 5.2.1
LANGUAGE: en_US.utf8
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.
# Action percentage for Jmeter and Locust load executors
# Action percentage for JMeter and Locust load executors
view_page: 54
view_dashboard: 6
view_blog: 8
Expand All @@ -30,6 +32,8 @@ settings:
upload_attachment: 5
like_page: 3
standalone_extension: 0 # By default disabled
# Custom dataset section.
custom_dataset_query: # Write CQL query to add CQL output to the app/datasets/confluence/custom_pages.csv, e.g. "title ~ 'AppPage*'"
services:
- module: shellexec
prepare:
Expand Down Expand Up @@ -105,7 +109,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "84.0.4147.30" # Supports Chrome version 84. You can refer to http://chromedriver.chromium.org/downloads
version: "86.0.4240.22" # Supports Chrome version 86. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
16 changes: 7 additions & 9 deletions app/extension/bitbucket/extension_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@

def app_specific_action(webdriver, datasets):
page = BasePage(webdriver)
repo = datasets['repos']
repo_slug = repo[0]
project_key = repo[1]

@print_timing("selenium_app_custom_action")
def measure():

@print_timing("selenium_app_custom_action:view_report")
@print_timing("selenium_app_custom_action:view_repo_page")
def sub_measure():
page.go_to_url(f"{BITBUCKET_SETTINGS.server_url}/plugin/report")
page.wait_until_visible((By.ID, 'report_app_element_id'))
sub_measure()

@print_timing("selenium_app_custom_action:view_dashboard")
def sub_measure():
page.go_to_url(f"{BITBUCKET_SETTINGS.server_url}/plugin/dashboard")
page.wait_until_visible((By.ID, 'dashboard_app_element_id'))
page.go_to_url(f"{BITBUCKET_SETTINGS.server_url}/projects/{project_key}/repos/{repo_slug}/browse")
page.wait_until_visible((By.CSS_SELECTOR, '.aui-navgroup-vertical>.aui-navgroup-inner')) # Wait for repo navigation panel is visible
page.wait_until_visible((By.ID, 'ID_OF_YOUR_APP_SPECIFIC_UI_ELEMENT')) # Wait for you app-specific UI element by ID selector
sub_measure()
measure()
90 changes: 0 additions & 90 deletions app/extension/confluence/extension.jmx

This file was deleted.

24 changes: 12 additions & 12 deletions app/extension/confluence/extension_locust.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@

@confluence_measure
def app_specific_action(locust):
r = locust.get('/app/get_endpoint', catch_response=True) # call app-specific GET endpoint
content = r.content.decode('utf-8') # decode response content

r = locust.client.get('/plugin/report') # navigate to page

content = r.content.decode('utf-8') # parse page content
token_pattern_example = '"token":"(.+?)"'
id_pattern_example = '"id":"(.+?)"'
token = re.findall(token_pattern_example, content) # parse variables from response using regexp
id = re.findall(id_pattern_example, content)
logger.locust_info(f'token: {token}, id: {id}') # logger for debug when verbose is true in confluence.yml file
token = re.findall(token_pattern_example, content) # get TOKEN from response using regexp
id = re.findall(id_pattern_example, content) # get ID from response using regexp

logger.locust_info(f'token: {token}, id: {id}') # log information for debug when verbose is true in jira.yml file
if 'assertion string' not in content:
logger.error(f"'assertion string' was not found in {content}")
assert 'assertion string' in content # assertion after GET request
assert 'assertion string' in content # assert specific string in response content

body = {"id": id, "token": token} # include parsed variables to POST body
body = {"id": id, "token": token} # include parsed variables to POST request body
headers = {'content-type': 'application/json'}
r = locust.client.post('/plugin/post/endpoint', body, headers) # send some POST request
r = locust.post('/app/post_endpoint', body, headers, catch_response=True) # call app-specific POST endpoint
content = r.content.decode('utf-8')
if 'assertion string after successful post request' not in content:
logger.error(f"'assertion string after successful post request' was not found in {content}")
assert 'assertion string after successful post request' in content # assertion after POST request
if 'assertion string after successful POST request' not in content:
logger.error(f"'assertion string after successful POST request' was not found in {content}")
assert 'assertion string after successful POST request' in content # assertion after POST request
16 changes: 7 additions & 9 deletions app/extension/confluence/extension_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,17 @@

def app_specific_action(webdriver, datasets):
page = BasePage(webdriver)
if datasets['custom_pages']:
app_specific_page = datasets['custom_pages']
app_specific_page_id = app_specific_page[0]

@print_timing("selenium_app_custom_action")
def measure():

@print_timing("selenium_app_custom_action:view_report")
@print_timing("selenium_app_custom_action:view_page")
def sub_measure():
page.go_to_url(f"{CONFLUENCE_SETTINGS.server_url}/plugin/report")
page.wait_until_visible((By.ID, 'report_app_element_id'))
sub_measure()

@print_timing("selenium_app_custom_action:view_dashboard")
def sub_measure():
page.go_to_url(f"{CONFLUENCE_SETTINGS.server_url}/plugin/dashboard")
page.wait_until_visible((By.ID, 'dashboard_app_element_id'))
page.go_to_url(f"{CONFLUENCE_SETTINGS.server_url}/pages/viewpage.action?pageId={app_specific_page_id}")
page.wait_until_visible((By.ID, "title-text")) # Wait for title field visible
page.wait_until_visible((By.ID, "ID_OF_YOUR_APP_SPECIFIC_UI_ELEMENT")) # Wait for you app-specific UI element by ID selector
sub_measure()
measure()
Loading

0 comments on commit 8651a33

Please sign in to comment.