Skip to content

Commit

Permalink
Merge pull request #750 from atlassian/release/6.0.0
Browse files Browse the repository at this point in the history
Release 6.0.0
  • Loading branch information
SergeyMoroz0703 committed Dec 14, 2021
2 parents c972679 + 7ecaac8 commit 4361031
Show file tree
Hide file tree
Showing 73 changed files with 4,566 additions and 181 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
# bzt run: docker run --shm-size=4g -v "$PWD:/dc-app-performance-toolkit" atlassian/dcapt jira.yml
# interactive run: docker run -it --entrypoint="/bin/bash" -v "$PWD:/dc-app-performance-toolkit" atlassian/dcapt

FROM blazemeter/taurus
FROM blazemeter/taurus:1.16.0

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

RUN apt-get -y update \
&& $APT_INSTALL vim git openssh-server python3.8-dev python3-pip wget \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 \
&& $APT_INSTALL vim git openssh-server python3.9-dev python3-pip wget \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 \
&& python -m pip install --upgrade pip \
&& python -m pip install --upgrade setuptools \
&& apt-get clean
Expand Down
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@ This repository contains Taurus scripts for performance testing of Atlassian Dat
* Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.6.10`, `7.17.1`

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

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

## Support
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.

## Installation and set up

#### Dependencies
* Python 3.7-3.8 and pip
* Python 3.7, 3.8 or 3.9 and pip
* JDK 8
* Google Chrome web browser
* Git client (only for Bitbucket DC)
Expand Down Expand Up @@ -63,7 +66,7 @@ pip install virtualenv
```
2. Create new virtual env with python3:
```
virtualenv venv -p python3
virtualenv venv -p full_path_to_python # e.g. use `which python3.9` to find the path
```
3. Activate virtual env:
```
Expand All @@ -78,8 +81,8 @@ pip install -r requirements.txt
Make sure that you have:
* [Python](https://www.python.org/downloads/) (see [dependencies](#dependencies) section for supported versions)
* pip
* [JDK 8](https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) installed
* Python developer package (e.g. `python3.8-dev` package for Python3.8)
* [JDK 11](https://www.oracle.com/java/technologies/downloads/#java11) installed
* Python developer package (e.g. `python3.9-dev` package for Python3.9)
* Google Chrome web browser
```
python3 --version
Expand All @@ -92,11 +95,11 @@ git --version
```
We recommend using [virtualenv](https://virtualenv.pypa.io/en/latest/) for Taurus. See example setup below.

## Example setup for clean Ubuntu 18.04
## Example setup for clean Ubuntu 20.04
JDK setup (if missing):
```
sudo apt-get update
sudo apt-get install -y openjdk-8-jre-headless
sudo apt-get install -y openjdk-11-jre-headless
```
Chrome setup (if missing):
```
Expand All @@ -107,9 +110,9 @@ sudo apt-get install -y ./google-chrome-stable_current_amd64.deb
Python and virtualenv setup:
```
sudo apt-get update
sudo apt-get -y install python3.8-dev python3-pip virtualenv
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1
virtualenv venv -p python
sudo apt-get -y install python3.9-dev python3-pip virtualenv
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
virtualenv venv -p /usr/bin/python
source venv/bin/activate
pip install -r requirements.txt
```
Expand Down Expand Up @@ -146,7 +149,7 @@ pip install virtualenv
```
2. Create new virtual env with python3:
```
virtualenv venv -p python
virtualenv venv -p full_path_to_python # e.g. use `where python3.9` to find the path
```
3. Activate virtual env:
```
Expand Down
114 changes: 114 additions & 0 deletions app/bamboo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
settings:
artifacts-dir: results/bamboo/%Y-%m-%d_%H-%M-%S
aggregator: consolidator
verbose: false
env:
application_hostname: test-bamboo.atlassian.com # Bamboo DC hostname without protocol and port e.g. test-bamboo.atlassian.com or localhost
application_protocol: http # http or https
application_port: 8085 # 80, 443, 8085, etc
secure: True # Set False to allow insecure connections, e.g. when using self-signed SSL certificate
application_postfix: # e.g. /bamboo in case of url like http://localhost/bamboo
admin_login: admin
admin_password: admin
load_executor: jmeter
concurrency: 200 # number of Bamboo users for Selenium actions
test_duration: 45m
ramp-up: 3m # time to spin all concurrent threads
total_actions_per_hour: 2000 # number of total JMeter actions per hour
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.
view_all_builds: 15
view_build_result: 15
view_build_configuration: 10
view_job_configuration: 10
view_build_summary: 10
view_projects_list: 10
standalone_extension: 0 # By default disabled

number_of_agents: 50 # number of available remote agents
parallel_plans_count: 40 # number of parallel plans execution
start_plan_timeout: 60 # maximum timeout of plan to start
default_dataset_plan_duration: 60 # expected plan execution duration
services:
- module: shellexec
prepare:
- python util/pre_run/environment_checker.py
- python util/data_preparation/bamboo_prepare_data.py
shutdown:
- python util/post_run/jmeter_post_check.py
- python util/jtl_convertor/jtls-to-csv.py kpi.jtl kpi-1.jtl selenium.jtl
post-process:
- python util/analytics/analytics.py bamboo
- python util/post_run/cleanup_results_dir.py
execution:
- scenario: jmeter
executor: jmeter
concurrency: ${concurrency}
hold-for: ${test_duration}
ramp-up: ${ramp-up}
- scenario: locust
executor: locust
concurrency: ${parallel_plans_count}
hold-for: ${test_duration}
ramp-up: ${default_dataset_plan_duration}
- scenario: selenium
executor: selenium
runner: pytest
hold-for: ${test_duration}
scenarios:
selenium:
script: selenium_ui/bamboo_ui.py
locust:
script: locustio/bamboo/locustfile.py
jmeter:
script: jmeter/bamboo.jmx
properties:
application_hostname: ${application_hostname}
application_protocol: ${application_protocol}
application_port: ${application_port}
application_postfix: ${application_postfix}
# Workload model
total_actions_per_hr: ${total_actions_per_hour}
perc_view_all_builds: ${view_all_builds}
perc_view_build_result: ${view_build_result}
perc_view_build_configuration: ${view_build_configuration}
perc_view_job_configuration: ${view_job_configuration}
perc_view_build_summary: ${view_build_summary}
perc_view_projects_list: ${view_projects_list}
perc_standalone_extension: ${standalone_extension}
modules:
consolidator:
rtimes-len: 0 # CONFSRVDEV-7631 reduce sampling
percentiles: [] # CONFSRVDEV-7631 disable all percentiles due to Taurus's excessive memory usage
jmeter:
version: ${JMETER_VERSION}
detect-plugins: true
memory-xmx: 8G # allow JMeter to use up to 8G of memory
plugins:
- bzm-parallel=0.4
- bzm-random-csv=0.6
- jpgc-casutg=2.5
- jpgc-dummy=0.2
- jpgc-ffw=2.0
- jpgc-fifo=0.2
- jpgc-functions=2.1
- jpgc-json=2.6
- jpgc-perfmon=2.1
- jpgc-prmctl=0.4
- jpgc-tst=2.4
- jpgc-wsc=0.3
- tilln-sshmon=1.0
- jpgc-synthesis=2.2
system-properties:
server.rmi.ssl.disable: true
java.rmi.server.hostname: localhost
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "96.0.4664.45" # Supports Chrome version 96. 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 @@ -86,7 +86,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "95.0.4638.69" # Supports Chrome version 95. You can refer to http://chromedriver.chromium.org/downloads
version: "96.0.4664.45" # Supports Chrome version 96. 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 @@ -110,7 +110,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "95.0.4638.69" # Supports Chrome version 95. You can refer to http://chromedriver.chromium.org/downloads
version: "96.0.4664.45" # Supports Chrome version 96. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
Empty file.
41 changes: 41 additions & 0 deletions app/extension/bamboo/extension_ui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import random

from selenium.webdriver.common.by import By

from selenium_ui.base_page import BasePage
from selenium_ui.conftest import print_timing
from selenium_ui.bamboo.pages.pages import Login
from util.conf import BAMBOO_SETTINGS


def app_specific_action(webdriver, datasets):
page = BasePage(webdriver)
rnd_plan = random.choice(datasets["build_plans"])

build_plan_id = rnd_plan[1]

# To run action as specific user uncomment code bellow.
# NOTE: If app_specific_action is running as specific user, make sure that app_specific_action is running
# just before test_2_selenium_z_log_out action
#
# @print_timing("selenium_app_specific_user_login")
# def measure():
# def app_specific_user_login(username='admin', password='admin'):
# login_page = Login(webdriver)
# login_page.delete_all_cookies()
# login_page.go_to()
# login_page.set_credentials(username=username, password=password)
# login_page.click_login_button()
# app_specific_user_login(username='admin', password='admin')
# measure()

@print_timing("selenium_app_custom_action")
def measure():
@print_timing("selenium_app_custom_action:view_plan_summary_page")
def sub_measure():
page.go_to_url(f"{BAMBOO_SETTINGS.server_url}/browse/{build_plan_id}")
page.wait_until_visible((By.ID, "buildResultsTable")) # Wait for summary field visible
# Wait for you app-specific UI element by ID selector
page.wait_until_visible((By.ID, "ID_OF_YOUR_APP_SPECIFIC_UI_ELEMENT"))
sub_measure()
measure()
2 changes: 1 addition & 1 deletion app/jira.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: "95.0.4638.69" # Supports Chrome version 95. You can refer to http://chromedriver.chromium.org/downloads
version: "96.0.4664.45" # Supports Chrome version 96. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
Loading

0 comments on commit 4361031

Please sign in to comment.