Skip to content

Commit

Permalink
Merge pull request #552 from atlassian/release/4.1.0
Browse files Browse the repository at this point in the history
Release 4.1.0
  • Loading branch information
SergeyMoroz0703 committed Mar 17, 2021
2 parents 1b49bcb + 27087a0 commit 76b93a9
Show file tree
Hide file tree
Showing 71 changed files with 1,655 additions and 1,032 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# name: atlassain/dcapt
# name: atlassian/dcapt
# working dir: dc-app-performance-toolkit
# build: docker build -t atlassain/dcapt .
# build: docker build -t atlassian/dcapt .
# 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

Expand All @@ -9,12 +9,16 @@ FROM blazemeter/taurus
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 google-chrome-stable \
&& $APT_INSTALL vim git openssh-server python3.8-dev python3-pip wget \
&& update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 \
&& python -m pip install --upgrade pip \
&& python -m pip install --upgrade setuptools \
&& apt-get clean

RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
&& $APT_INSTALL ./google-chrome-stable_current_amd64.deb \
&& rm -rf ./google-chrome-stable_current_amd64.deb

COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt

Expand Down
71 changes: 60 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ 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.3`, `8.5.11`
* Jira [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `8.13.4`, `8.5.12`

* Supported Jira Service Management versions:
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `4.13.2`, `4.5.10`
* Jira Service Management [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `4.13.4`, `4.5.12`

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

* Supported Bitbucket Server versions:
* Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.6.2`, `6.10.7`
* Bitbucket Server [Long Term Support release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): `7.6.4`, `6.10.9`
* Bitbucket Server Platform release: `7.0.5`

## Support
Expand All @@ -27,25 +27,34 @@ In case of technical questions, issues or problems with DC Apps Performance Tool
* Python 3.6-3.8 and pip
* JDK 8
* Google Chrome web browser
* Git client (only for Bitbucket Server)
* Git client (only for Bitbucket DC)

Please make sure you have a version of Chrome browser that is compatible with [ChromeDriver](http://chromedriver.chromium.org/downloads) version set in app/$product.yml file (modules->selenium->chromedriver->version).

If a first part of ChromeDriver version does not match with a first part of your Chrome browser version, update Chrome browser or set compatible [ChromeDriver](http://chromedriver.chromium.org/downloads) version in .yml file.

### macOS/Linux
Make sure that 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:
### macOS setup
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
* XCode Command Line Tools
* Google Chrome web browser
```
python3 --version
pip --version
java -version
# command to check if XCode Command Line Tools installed
xcode-select --print-path
# or command to install if XCode Command Line Tools
xcode-select --install
```
For Bitbucket Server check that [Git](https://git-scm.com/downloads) is installed:
For Bitbucket DC check that [Git](https://git-scm.com/downloads) is installed:
```
git --version
```

We recommend using virtualenv for Taurus.
We recommend using [virtualenv](https://virtualenv.pypa.io/en/latest/) for Taurus.

1. Install virtualenv with pip:
```
Expand All @@ -64,7 +73,47 @@ source venv/bin/activate
pip install -r requirements.txt
```

### Windows
### Linux setup
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)
* Google Chrome web browser
```
python3 --version
pip --version
java -version
```
For Bitbucket DC check that [Git](https://git-scm.com/downloads) is installed:
```
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
JDK setup (if missing):
```
sudo apt-get update
sudo apt-get install -y openjdk-8-jre-headless
```
Chrome setup (if missing):
```
sudo apt-get update
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
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
source venv/bin/activate
pip install -r requirements.txt
```

### Windows setup
#### Installing Taurus manually
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:
```
Expand All @@ -89,7 +138,7 @@ Otherwise, download it from [Microsoft Visual C++ Build Tools:](https://visualst

Setup [Windows 10 SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk/)

We recommend using virtualenv for Taurus.
We recommend using [virtualenv](https://virtualenv.pypa.io/en/latest/) for Taurus.
1. Install virtualenv with pip:
```
pip install virtualenv
Expand Down
2 changes: 1 addition & 1 deletion app/bitbucket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "88.0.4324.27" # Supports Chrome version 88. You can refer to http://chromedriver.chromium.org/downloads
version: "89.0.4389.23" # Supports Chrome version 89. 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 @@ -109,7 +109,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "88.0.4324.27" # Supports Chrome version 88. You can refer to http://chromedriver.chromium.org/downloads
version: "89.0.4389.23" # Supports Chrome version 89. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
18 changes: 18 additions & 0 deletions app/extension/bitbucket/extension_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from selenium_ui.base_page import BasePage
from selenium_ui.conftest import print_timing
from selenium_ui.bitbucket.pages.pages import LoginPage, GetStarted
from util.conf import BITBUCKET_SETTINGS


Expand All @@ -14,6 +15,23 @@ def app_specific_action(webdriver, datasets):
project_key = rnd_repo[1]
repo_slug = rnd_repo[0]

# 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_logout action

# @print_timing("selenium_app_specific_user_login")
# def measure():
# def app_specific_user_login(username='admin', password='admin'):
# login_page = LoginPage(webdriver)
# login_page.delete_all_cookies()
# login_page.go_to()
# login_page.set_credentials(username=username, password=password)
# login_page.submit_login()
# get_started_page = GetStarted(webdriver)
# get_started_page.wait_for_page_loaded()
# app_specific_user_login(username='admin', password='admin')
# measure()

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

Expand Down
3 changes: 2 additions & 1 deletion app/extension/confluence/extension_locust.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import re
from locustio.common_utils import init_logger, confluence_measure
from locustio.common_utils import init_logger, confluence_measure, run_as_specific_user # noqa F401

logger = init_logger(app_type='confluence')


@confluence_measure("locust_app_specific_action")
# @run_as_specific_user(username='admin', password='admin') # run as specific user
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
Expand Down
20 changes: 20 additions & 0 deletions app/extension/confluence/extension_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from selenium_ui.base_page import BasePage
from selenium_ui.conftest import print_timing
from selenium_ui.confluence.pages.pages import Login, AllUpdates
from util.conf import CONFLUENCE_SETTINGS


Expand All @@ -12,6 +13,25 @@ def app_specific_action(webdriver, datasets):
if datasets['custom_pages']:
app_specific_page_id = datasets['custom_page_id']

# 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
# @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.wait_for_page_loaded()
# login_page.set_credentials(username=username, password=password)
# login_page.click_login_button()
# if login_page.is_first_login():
# login_page.first_user_setup()
# all_updates_page = AllUpdates(webdriver)
# all_updates_page.wait_for_page_loaded()
# app_specific_user_login(username='admin', password='admin')
# measure()

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

Expand Down
3 changes: 2 additions & 1 deletion app/extension/jira/extension_locust.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import re
from locustio.common_utils import init_logger, jira_measure
from locustio.common_utils import init_logger, jira_measure, run_as_specific_user # noqa F401

logger = init_logger(app_type='jira')


@jira_measure("locust_app_specific_action")
# @run_as_specific_user(username='admin', password='admin') # run as specific user
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
Expand Down
22 changes: 21 additions & 1 deletion app/extension/jira/extension_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from selenium_ui.base_page import BasePage
from selenium_ui.conftest import print_timing
from selenium_ui.jira.pages.pages import Login
from util.conf import JIRA_SETTINGS


Expand All @@ -12,13 +13,32 @@ def app_specific_action(webdriver, datasets):
if datasets['custom_issues']:
issue_key = datasets['custom_issue_key']

# 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)
# if login_page.is_first_login():
# login_page.first_login_setup()
# if login_page.is_first_login_second_page():
# login_page.first_login_second_page_setup()
# login_page.wait_for_page_loaded()
# app_specific_user_login(username='admin', password='admin')
# measure()

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

@print_timing("selenium_app_custom_action:view_issue")
def sub_measure():
page.go_to_url(f"{JIRA_SETTINGS.server_url}/browse/{issue_key}")
page.wait_until_visible((By.ID, "summary-val")) # Wait for summary 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()

3 changes: 2 additions & 1 deletion app/extension/jsm/extension_locust_agents.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import re
from locustio.common_utils import init_logger, jsm_agent_measure
from locustio.common_utils import init_logger, jsm_agent_measure, run_as_specific_user # noqa F401

logger = init_logger(app_type='jsm')


@jsm_agent_measure('locust_agent_app_specific_action')
# @run_as_specific_user(username='admin', password='admin') # run as specific user
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
Expand Down
3 changes: 2 additions & 1 deletion app/extension/jsm/extension_locust_customers.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import re
from locustio.common_utils import init_logger, jsm_customer_measure
from locustio.common_utils import init_logger, jsm_customer_measure, run_as_specific_user # noqa F401

logger = init_logger(app_type='jsm')


@jsm_customer_measure('locust_customer_app_specific_action')
# @run_as_specific_user(username='admin', password='admin') # run as specific user
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
Expand Down
20 changes: 20 additions & 0 deletions app/extension/jsm/extension_ui_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from selenium_ui.base_page import BasePage
from selenium_ui.conftest import print_timing
from selenium_ui.jsm.pages.agent_pages import Login
from util.conf import JSM_SETTINGS


Expand All @@ -10,6 +11,25 @@ def app_specific_action(webdriver, datasets):
if datasets['custom_issues']:
issue_key = datasets['custom_issue_key']

# 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)
# if login_page.is_first_login():
# login_page.first_login_setup()
# if login_page.is_first_login_second_page():
# login_page.first_login_second_page_setup()
# login_page.wait_for_page_loaded()
# app_specific_user_login(username='admin', password='admin')
# measure()

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

Expand Down
16 changes: 16 additions & 0 deletions app/extension/jsm/extension_ui_customers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from selenium_ui.base_page import BasePage
from selenium_ui.conftest import print_timing
from selenium_ui.jsm.pages.customer_pages import Login
from util.conf import JSM_SETTINGS


Expand All @@ -11,6 +12,21 @@ def app_specific_action(webdriver, datasets):
custom_request_key = datasets['custom_issue_key']
custom_service_desk_id = datasets['custom_service_desk_id']

# 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.wait_for_page_loaded()
# app_specific_user_login(username='admin', password='admin')
# measure()

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

Expand Down
2 changes: 1 addition & 1 deletion app/jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "88.0.4324.27" # Supports Chrome version 88. You can refer to http://chromedriver.chromium.org/downloads
version: "89.0.4389.23" # Supports Chrome version 89. You can refer to http://chromedriver.chromium.org/downloads
reporting:
- data-source: sample-labels
module: junit-xml
Loading

0 comments on commit 76b93a9

Please sign in to comment.