Skip to content

Commit a8c7151

Browse files
authored
Merge pull request #796 from atlassian/release/6.1.0
Release 6.1.0
2 parents d593de1 + c11ccdf commit a8c7151

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+918
-531
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# bzt run: docker run --shm-size=4g -v "$PWD:/dc-app-performance-toolkit" atlassian/dcapt jira.yml
55
# interactive run: docker run -it --entrypoint="/bin/bash" -v "$PWD:/dc-app-performance-toolkit" atlassian/dcapt
66

7-
FROM blazemeter/taurus:1.16.0
7+
FROM blazemeter/taurus:1.16.2
88

99
ENV APT_INSTALL="apt-get -y install --no-install-recommends"
1010

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ 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.13`, `8.20.1`
8+
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `8.13.16`, `8.20.4`
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.13`, `4.20.1`
11+
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `4.13.16`, `4.20.4`
1212

1313
* Supported Confluence versions:
14-
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.13.2`, `7.4.13`
14+
* Confluence [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.13.3`, `7.4.14`
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.10`, `7.17.1`
17+
* Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.6.13`, `7.17.5`
1818

1919
* Supported Crowd versions:
2020
* Crowd [release notes](https://confluence.atlassian.com/crowd/crowd-release-notes-199094.html): `4.4.0`
2121

2222
* Supported Bamboo versions:
23-
* Bamboo [release notes](https://confluence.atlassian.com/bamboo/bamboo-release-notes-671089224.html): `8.1.0`
23+
* Bamboo [release notes](https://confluence.atlassian.com/bamboo/bamboo-release-notes-671089224.html): `8.1.1`
2424

2525
## Support
2626
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.
@@ -41,7 +41,7 @@ If a first part of ChromeDriver version does not match with a first part of your
4141
Make sure that you have:
4242
* [Python](https://www.python.org/downloads/) (see [dependencies](#dependencies) section for supported versions)
4343
* pip
44-
* [JDK 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) installed
44+
* [JDK 11](https://www.oracle.com/java/technologies/downloads/#java11) installed
4545
* XCode Command Line Tools
4646
* Google Chrome web browser
4747
```
@@ -119,7 +119,7 @@ pip install -r requirements.txt
119119

120120
### Windows setup
121121
#### Installing Taurus manually
122-
Make sure you have [Python](https://www.python.org/downloads/) (see [dependencies](#dependencies) section for supported versions), pip, and [JDK 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) installed:
122+
Make sure you have [Python](https://www.python.org/downloads/) (see [dependencies](#dependencies) section for supported versions), pip, and [JDK 11](https://www.oracle.com/java/technologies/downloads/#java11) installed:
123123
```
124124
python --version or python3 --version
125125
pip --version
@@ -149,7 +149,7 @@ pip install virtualenv
149149
```
150150
2. Create new virtual env with python3:
151151
```
152-
virtualenv venv -p full_path_to_python # e.g. use `where python3.9` to find the path
152+
virtualenv venv -p full_path_to_python # e.g. use `where python` to find the path to correct python
153153
```
154154
3. Activate virtual env:
155155
```

app/bamboo.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,31 @@ settings:
66
env:
77
application_hostname: test-bamboo.atlassian.com # Bamboo DC hostname without protocol and port e.g. test-bamboo.atlassian.com or localhost
88
application_protocol: http # http or https
9-
application_port: 8085 # 80, 443, 8085, etc
9+
application_port: 80 # 80, 443, 8085, etc
1010
secure: True # Set False to allow insecure connections, e.g. when using self-signed SSL certificate
1111
application_postfix: # e.g. /bamboo in case of url like http://localhost/bamboo
1212
admin_login: admin
1313
admin_password: admin
1414
load_executor: jmeter
1515
concurrency: 200 # number of Bamboo users for Selenium actions
1616
test_duration: 45m
17-
ramp-up: 3m # time to spin all concurrent threads
17+
ramp-up: 5m # time to spin all concurrent threads
1818
total_actions_per_hour: 2000 # number of total JMeter actions per hour
1919
WEBDRIVER_VISIBLE: False
20-
JMETER_VERSION: 5.2.1
20+
JMETER_VERSION: 5.4.2
2121
LANGUAGE: en_US.utf8
2222
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.
23+
# Action percentage for JMeter load executor
2324
view_all_builds: 15
2425
view_build_result: 15
2526
view_build_configuration: 10
2627
view_job_configuration: 10
2728
view_build_summary: 10
2829
view_projects_list: 10
29-
standalone_extension: 0 # By default disabled
30-
30+
standalone_extension: 0 # Standalone extension weight for JMeter. By default, disabled. Set appropriate weight to enable.
31+
# Locust app specific
32+
standalone_extension_locust: 0 # Standalone extension weight for Locust. By default, disabled. Set 1 to enable.
33+
# Bamboo agents and plans settings
3134
number_of_agents: 50 # number of available remote agents
3235
parallel_plans_count: 40 # number of parallel plans execution
3336
start_plan_timeout: 60 # maximum timeout of plan to start
@@ -39,10 +42,13 @@ services:
3942
- python util/data_preparation/bamboo_prepare_data.py
4043
shutdown:
4144
- python util/post_run/jmeter_post_check.py
42-
- python util/jtl_convertor/jtls-to-csv.py kpi.jtl kpi-1.jtl selenium.jtl
45+
- python util/jtl_convertor/jtls-to-csv.py kpi*.jtl selenium.jtl
4346
post-process:
4447
- python util/analytics/analytics.py bamboo
4548
- python util/post_run/cleanup_results_dir.py
49+
- module: pip-install
50+
packages:
51+
- selenium==3.141.0
4652
execution:
4753
- scenario: jmeter
4854
executor: jmeter
@@ -54,6 +60,12 @@ execution:
5460
concurrency: ${parallel_plans_count}
5561
hold-for: ${test_duration}
5662
ramp-up: ${default_dataset_plan_duration}
63+
## Locust app-specific scenario. Uncomment below lines to enable.
64+
# - scenario: locust_app_specific
65+
# executor: locust
66+
# concurrency: ${concurrency}
67+
# hold-for: ${test_duration}
68+
# ramp-up: ${ramp-up}
5769
- scenario: selenium
5870
executor: selenium
5971
runner: pytest
@@ -63,6 +75,8 @@ scenarios:
6375
script: selenium_ui/bamboo_ui.py
6476
locust:
6577
script: locustio/bamboo/locustfile.py
78+
locust_app_specific:
79+
script: locustio/bamboo/locustfile_app_specific.py
6680
jmeter:
6781
script: jmeter/bamboo.jmx
6882
properties:
@@ -108,7 +122,7 @@ modules:
108122
httpsampler.ignore_failed_embedded_resources: "true"
109123
selenium:
110124
chromedriver:
111-
version: "96.0.4664.45" # Supports Chrome version 96. You can refer to http://chromedriver.chromium.org/downloads
125+
version: "97.0.4692.71" # Supports Chrome version 97. You can refer to http://chromedriver.chromium.org/downloads
112126
reporting:
113127
- data-source: sample-labels
114128
module: junit-xml

app/bitbucket.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ settings:
1717
ramp-up: 10m # time to spin all concurrent users
1818
total_actions_per_hour: 32700
1919
WEBDRIVER_VISIBLE: False
20-
JMETER_VERSION: 5.2.1
20+
JMETER_VERSION: 5.4.2
2121
LANGUAGE: en_US.utf8
2222
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.
2323
services:
@@ -33,6 +33,9 @@ services:
3333
post-process:
3434
- python util/analytics/analytics.py bitbucket
3535
- python util/post_run/cleanup_results_dir.py
36+
- module: pip-install
37+
packages:
38+
- selenium==3.141.0
3639
execution:
3740
- scenario: ${load_executor}
3841
concurrency: ${concurrency}
@@ -86,7 +89,7 @@ modules:
8689
httpsampler.ignore_failed_embedded_resources: "true"
8790
selenium:
8891
chromedriver:
89-
version: "96.0.4664.45" # Supports Chrome version 96. You can refer to http://chromedriver.chromium.org/downloads
92+
version: "97.0.4692.71" # Supports Chrome version 97. You can refer to http://chromedriver.chromium.org/downloads
9093
reporting:
9194
- data-source: sample-labels
9295
module: junit-xml

app/confluence.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ settings:
1717
ramp-up: 5m # time to spin all concurrent users
1818
total_actions_per_hour: 20000
1919
WEBDRIVER_VISIBLE: False
20-
JMETER_VERSION: 5.2.1
20+
JMETER_VERSION: 5.4.2
2121
LANGUAGE: en_US.utf8
2222
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.
2323
# Action percentage for JMeter and Locust load executors
@@ -46,6 +46,9 @@ services:
4646
post-process:
4747
- python util/analytics/analytics.py confluence
4848
- python util/post_run/cleanup_results_dir.py
49+
- module: pip-install
50+
packages:
51+
- selenium==3.141.0
4952
execution:
5053
- scenario: ${load_executor}
5154
executor: ${load_executor}
@@ -110,7 +113,7 @@ modules:
110113
httpsampler.ignore_failed_embedded_resources: "true"
111114
selenium:
112115
chromedriver:
113-
version: "96.0.4664.45" # Supports Chrome version 96. You can refer to http://chromedriver.chromium.org/downloads
116+
version: "97.0.4692.71" # Supports Chrome version 97. You can refer to http://chromedriver.chromium.org/downloads
114117
reporting:
115118
- data-source: sample-labels
116119
module: junit-xml

app/crowd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ settings:
2929
# ramp-up: 5s # time to spin all concurrent threads
3030
# total_actions_per_hour: 720000 # number of total JMeter actions per hour
3131

32-
JMETER_VERSION: 5.2.1
32+
JMETER_VERSION: 5.4.2
3333
LANGUAGE: en_US.utf8
34-
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.
34+
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.
3535
services:
3636
- module: shellexec
3737
prepare:
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import re
2+
from locustio.common_utils import init_logger, bamboo_measure, run_as_specific_user # noqa F401
3+
4+
logger = init_logger(app_type='bamboo')
5+
6+
7+
@bamboo_measure("locust_app_specific_action")
8+
# @run_as_specific_user(username='admin', password='admin') # run as specific user
9+
def app_specific_action(locust):
10+
r = locust.get('/app/get_endpoint', catch_response=True) # call app-specific GET endpoint
11+
content = r.content.decode('utf-8') # decode response content
12+
13+
token_pattern_example = '"token":"(.+?)"'
14+
id_pattern_example = '"id":"(.+?)"'
15+
token = re.findall(token_pattern_example, content) # get TOKEN from response using regexp
16+
id = re.findall(id_pattern_example, content) # get ID from response using regexp
17+
18+
logger.locust_info(f'token: {token}, id: {id}') # log info for debug when verbose is true in bamboo.yml file
19+
if 'assertion string' not in content:
20+
logger.error(f"'assertion string' was not found in {content}")
21+
assert 'assertion string' in content # assert specific string in response content
22+
23+
body = {"id": id, "token": token} # include parsed variables to POST request body
24+
headers = {'content-type': 'application/json'}
25+
r = locust.post('/app/post_endpoint', body, headers, catch_response=True) # call app-specific POST endpoint
26+
content = r.content.decode('utf-8')
27+
if 'assertion string after successful POST request' not in content:
28+
logger.error(f"'assertion string after successful POST request' was not found in {content}")
29+
assert 'assertion string after successful POST request' in content # assertion after POST request

app/jira.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ settings:
1717
ramp-up: 3m # time to spin all concurrent users
1818
total_actions_per_hour: 54500 # number of total JMeter/Locust actions per hour
1919
WEBDRIVER_VISIBLE: False
20-
JMETER_VERSION: 5.2.1
20+
JMETER_VERSION: 5.4.2
2121
LANGUAGE: en_US.utf8
2222
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.
2323
# Action percentage for Jmeter and Locust load executors
@@ -48,6 +48,9 @@ services:
4848
post-process:
4949
- python util/analytics/analytics.py jira
5050
- python util/post_run/cleanup_results_dir.py
51+
- module: pip-install
52+
packages:
53+
- selenium==3.141.0
5154
execution:
5255
- scenario: ${load_executor}
5356
executor: ${load_executor}
@@ -114,7 +117,7 @@ modules:
114117
httpsampler.ignore_failed_embedded_resources: "true"
115118
selenium:
116119
chromedriver:
117-
version: "96.0.4664.45" # Supports Chrome version 96. You can refer to http://chromedriver.chromium.org/downloads
120+
version: "97.0.4692.71" # Supports Chrome version 97. You can refer to http://chromedriver.chromium.org/downloads
118121
reporting:
119122
- data-source: sample-labels
120123
module: junit-xml

app/jsm.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ settings:
1919
total_actions_per_hour_agents: 5000
2020
total_actions_per_hour_customers: 15000
2121
WEBDRIVER_VISIBLE: False
22-
JMETER_VERSION: 5.2.1
22+
JMETER_VERSION: 5.4.2
2323
LANGUAGE: en_US.utf8
2424
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
@@ -53,10 +53,13 @@ services:
5353
- python util/data_preparation/jsm_prepare_data.py
5454
shutdown:
5555
- python util/post_run/jmeter_post_check.py
56-
- python util/jtl_convertor/jtls-to-csv.py kpi.jtl kpi-1.jtl selenium.jtl
56+
- python util/jtl_convertor/jtls-to-csv.py kpi*.jtl selenium.jtl
5757
post-process:
5858
- python util/analytics/analytics.py jsm
5959
- python util/post_run/cleanup_results_dir.py
60+
- module: pip-install
61+
packages:
62+
- selenium==3.141.0
6063
execution:
6164
- scenario: ${load_executor}_agents
6265
executor: ${load_executor}
@@ -151,7 +154,7 @@ modules:
151154
httpsampler.ignore_failed_embedded_resources: "true"
152155
selenium:
153156
chromedriver:
154-
version: "96.0.4664.45" # Supports Chrome version 96. You can refer to http://chromedriver.chromium.org/downloads
157+
version: "97.0.4692.71" # Supports Chrome version 97. You can refer to http://chromedriver.chromium.org/downloads
155158
reporting:
156159
- data-source: sample-labels
157160
module: junit-xml

app/locustio/bamboo/http_actions.py

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import random
22
import time
3+
import uuid
34

4-
from locustio.bamboo.requests_params import bamboo_datasets
5-
from locustio.common_utils import init_logger, JSON_HEADERS
6-
from util.api.bamboo_clients import BambooClient
75
from locust import events
86

7+
from locustio.bamboo.requests_params import bamboo_datasets, Login
8+
from locustio.common_utils import init_logger, JSON_HEADERS, TEXT_HEADERS, bamboo_measure
9+
from util.api.bamboo_clients import BambooClient
910
from util.conf import BAMBOO_SETTINGS
1011

1112
logger = init_logger(app_type='bamboo')
@@ -88,3 +89,36 @@ def run_build_plan(locust):
8889
logger.info(f'Total functions time: {total}. Expected full action time {action_time}. '
8990
f'Plan {build_plan_id} is successfully started. Waiting {sleep_time}.\n')
9091
time.sleep(sleep_time)
92+
93+
94+
@bamboo_measure('locust_bamboo_login')
95+
def locust_bamboo_login(locust):
96+
session_id = str(uuid.uuid4())
97+
locust.cross_action_storage[session_id] = dict()
98+
locust.session_data_storage = locust.cross_action_storage[session_id]
99+
locust.session_data_storage['app'] = 'bamboo'
100+
101+
params = Login()
102+
user = random.choice(bamboo_dataset["users"])
103+
username = user[0]
104+
password = user[1]
105+
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+
116+
content = r.content.decode('utf-8')
117+
118+
if 'Log Out' not in content:
119+
logger.error(f'Login with {username}, {password} failed: {content}')
120+
assert 'Log Out' in content, 'User authentication failed.'
121+
logger.locust_info(f'User {username} is successfully logged in')
122+
123+
locust.session_data_storage['username'] = user[0]
124+
locust.session_data_storage['password'] = user[1]

0 commit comments

Comments
 (0)