diff --git a/ANALYTICS_LICENSE.txt b/ANALYTICS_LICENSE.txt new file mode 100644 index 000000000..100c8ab6c --- /dev/null +++ b/ANALYTICS_LICENSE.txt @@ -0,0 +1,3 @@ +Atlassian is always striving to improve the Data Center App Performance Toolkit. +In order to do so, Atlassian uses analytics techniques to better understand how the Data Center App Performance Toolkit is being used. +For more information on these techniques and the type of data collected, please read our Privacy Policy (https://www.atlassian.com/legal/privacy-policy). \ No newline at end of file diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 0b68350cf..000000000 --- a/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2019 Atlassian Pty Ltd - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 000000000..3914eaa49 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 Atlassian Pty Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/README.md b/README.md index 82285cefd..1fa21303e 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ At the moment, Jira DC and Confluence DC support is in beta. Bitbucket DC suppor * Supported Confluence versions: * The latest Confluence [Enterprise Release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8 + * The latest Confluence Platform Release: 7.0.4 + ## Installation and set up @@ -20,7 +22,7 @@ At the moment, Jira DC and Confluence DC support is in beta. Bitbucket DC suppor * JDK 8 * Google Chrome web browser. -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). +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. @@ -98,5 +100,22 @@ pip install -r requirements.txt ## Additional info Official Taurus installation instructions are located [here](https://gettaurus.org/docs/Installation/). +## Analytics +The Data Center App Performance Toolkit includes some simple usage analytics. +We collect this data to better understand how the community is using the Performance Toolkit, and to help us plan our roadmap. +When a performance tests is completed we send one HTTP POST request with analytics. + +The request include the following data, and will in no way contain PII (Personally Identifiable Information). +- application under test (Jira/Confluence/Bitbucket) +- timestamp of performance toolkit run +- performance toolkit version +- operating system +- `concurrency` and `test_duration` from `$product.yml` file +- actual run duration +- executed action names and success rates +- unique user identifier (non PII) + +To help us continue improving the Toolkit, we’d love you to keep these analytics enabled in testing, staging, and production. If you don’t want to send us analytics, you can turn off the `allow_analytics` toggle in `$product.yml` file. + ## Running Taurus -Navigate to [docs](docs) folder and follow instructions. +Navigate to [docs](docs) folder and follow instructions. \ No newline at end of file diff --git a/app/confluence.yml b/app/confluence.yml index 694ca223a..69aa7dbfc 100644 --- a/app/confluence.yml +++ b/app/confluence.yml @@ -14,12 +14,16 @@ settings: test_duration: 45m WEBDRIVER_VISIBLE: False JMETER_VERSION: 5.1 + 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 prepare: + - python util/environment_checker.py - python util/data_preparation/confluence/prepare-data.py shutdown: - python util/jtl_convertor/jtls-to-csv.py kpi.jtl selenium.jtl + post-process: + - python util/analytics.py confluence execution: - scenario: jmeter concurrency: ${concurrency} @@ -82,4 +86,7 @@ modules: httpsampler.ignore_failed_embedded_resources: "true" selenium: chromedriver: - version: "78.0.3904.70" # Supports Chrome version 78. You can refer to http://chromedriver.chromium.org/downloads + version: "79.0.3945.36" # Supports Chrome version 79. You can refer to http://chromedriver.chromium.org/downloads +reporting: +- data-source: sample-labels + module: junit-xml \ No newline at end of file diff --git a/app/extension/confluence/extension_ui.py b/app/extension/confluence/extension_ui.py index 62851a1b3..449260c1d 100644 --- a/app/extension/confluence/extension_ui.py +++ b/app/extension/confluence/extension_ui.py @@ -1,7 +1,7 @@ from selenium.webdriver.common.by import By -from selenium.webdriver.support import expected_conditions as EC -from selenium.webdriver.support.wait import WebDriverWait +from selenium.webdriver.support import expected_conditions as ec +from selenium_ui.confluence.modules import _wait_until from selenium_ui.conftest import print_timing from util.conf import CONFLUENCE_SETTINGS @@ -15,14 +15,14 @@ def measure(webdriver, interaction): @print_timing def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/plugins/servlet/some-app/reporter') - WebDriverWait(webdriver, timeout).until(EC.visibility_of_element_located((By.ID, 'plugin-element'))) + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, "plugin-element")), interaction) measure(webdriver, 'selenium_app_custom_action:view_report') @print_timing def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/plugins/servlet/some-app/administration') - WebDriverWait(webdriver, timeout).until(EC.visibility_of_element_located((By.ID, 'plugin-dashboard'))) + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, "plugin-element")), interaction) measure(webdriver, 'selenium_app_custom_action:view_dashboard') diff --git a/app/extension/jira/extension_ui.py b/app/extension/jira/extension_ui.py index 6b9298e78..21d81e612 100644 --- a/app/extension/jira/extension_ui.py +++ b/app/extension/jira/extension_ui.py @@ -1,8 +1,8 @@ from selenium.webdriver.common.by import By -from selenium.webdriver.support import expected_conditions as EC -from selenium.webdriver.support.wait import WebDriverWait +from selenium.webdriver.support import expected_conditions as ec from selenium_ui.conftest import print_timing +from selenium_ui.jira.modules import _wait_until from util.conf import JIRA_SETTINGS APPLICATION_URL = JIRA_SETTINGS.server_url @@ -15,12 +15,15 @@ def measure(webdriver, interaction): @print_timing def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/plugins/servlet/some-app/reporter') - WebDriverWait(webdriver, timeout).until(EC.visibility_of_element_located((By.ID, 'plugin-element'))) + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, "plugin-element")), interaction) + measure(webdriver, 'selenium_app_custom_action:view_report') @print_timing def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/plugins/servlet/some-app/administration') - WebDriverWait(webdriver, timeout).until(EC.visibility_of_element_located((By.ID, 'plugin-dashboard'))) + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, "plugin-dashboard")), interaction) + measure(webdriver, 'selenium_app_custom_action:view_dashboard') + measure(webdriver, 'selenium_app_custom_action') diff --git a/app/jira.yml b/app/jira.yml index 3a1dd97d6..4b08ff471 100644 --- a/app/jira.yml +++ b/app/jira.yml @@ -14,12 +14,16 @@ settings: test_duration: 45m WEBDRIVER_VISIBLE: False JMETER_VERSION: 5.1 + 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 prepare: + - python util/environment_checker.py - python util/data_preparation/jira/prepare-data.py shutdown: - python util/jtl_convertor/jtls-to-csv.py kpi.jtl selenium.jtl + post-process: + - python util/analytics.py jira execution: - scenario: jmeter concurrency: ${concurrency} @@ -84,4 +88,7 @@ modules: httpsampler.ignore_failed_embedded_resources: "true" selenium: chromedriver: - version: "78.0.3904.70" # Supports Chrome version 78. You can refer to http://chromedriver.chromium.org/downloads \ No newline at end of file + version: "79.0.3945.36" # Supports Chrome version 79. You can refer to http://chromedriver.chromium.org/downloads +reporting: +- data-source: sample-labels + module: junit-xml \ No newline at end of file diff --git a/app/jmeter/confluence.jmx b/app/jmeter/confluence.jmx index 64a080564..fcff8e85f 100644 --- a/app/jmeter/confluence.jmx +++ b/app/jmeter/confluence.jmx @@ -61,7 +61,7 @@ Origin - ${application.protocol}://${application.hostname} + ${application.protocol}://${application.hostname}:${application.port} @@ -295,10 +295,6 @@ - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/login.action?os_destination=%2Findex.action&permissionViolation=true - Accept-Language en-US,en;q=0.5 @@ -348,10 +344,6 @@ - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/login.action?os_destination=%2Findex.action&permissionViolation=true - Accept-Language en-US,en;q=0.5 @@ -457,10 +449,6 @@ - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -510,10 +498,6 @@ - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -559,10 +543,6 @@ - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -615,10 +595,6 @@ - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -697,10 +673,6 @@ - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -810,10 +782,6 @@ - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -946,10 +914,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -1129,10 +1093,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1189,10 +1149,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1257,10 +1213,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1321,10 +1273,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1385,10 +1333,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1449,10 +1393,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1561,10 +1501,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1618,10 +1554,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1674,10 +1606,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1734,10 +1662,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1794,10 +1718,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1854,10 +1774,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -1921,10 +1837,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -2008,10 +1920,6 @@ vars.put("tree_request", request) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -2124,10 +2032,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/login.action?os_destination=%2Findex.action&permissionViolation=true - Accept-Language en-US,en;q=0.5 @@ -2237,10 +2141,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -2290,10 +2190,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -2339,10 +2235,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -2395,10 +2287,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -2477,10 +2365,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -2590,10 +2474,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -2674,10 +2554,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -2774,10 +2650,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -2834,10 +2706,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -2902,10 +2770,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -2966,10 +2830,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3030,10 +2890,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3094,10 +2950,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3186,10 +3038,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3262,10 +3110,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3318,10 +3162,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3378,10 +3218,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3438,10 +3274,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3498,10 +3330,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -3566,10 +3394,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/viewpage.action?pageId=83492986 - Accept-Language en-US,en;q=0.5 @@ -3658,10 +3482,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -3735,10 +3555,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -3803,10 +3619,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -3895,10 +3707,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/index.action - Accept-Language en-US,en;q=0.5 @@ -3990,10 +3798,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createblogpost.action?spaceKey=~admin - Accept-Language en-US,en;q=0.5 @@ -4051,10 +3855,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createblogpost.action?spaceKey=~admin - Accept-Language en-US,en;q=0.5 @@ -4100,10 +3900,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createblogpost.action?spaceKey=~admin - Accept-Language en-US,en;q=0.5 @@ -4156,10 +3952,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createblogpost.action?spaceKey=~admin - Accept-Language en-US,en;q=0.5 @@ -4216,10 +4008,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createblogpost.action?spaceKey=~admin - Accept-Language en-US,en;q=0.5 @@ -4277,10 +4065,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createblogpost.action?spaceKey=~admin - Accept-Language en-US,en;q=0.5 @@ -4335,10 +4119,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createblogpost.action?spaceKey=~admin - Accept-Language en-US,en;q=0.5 @@ -4420,10 +4200,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createblogpost.action?spaceKey=~admin - Accept-Language en-US,en;q=0.5 @@ -4490,10 +4266,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/pages/resumedraft.action?draftId=173736329&draftShareId=f32d5da6-341a-491e-9b74-f2184369cadf& - Accept-Language en-US,en;q=0.5 @@ -4546,10 +4318,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/pages/resumedraft.action?draftId=173736329&draftShareId=f32d5da6-341a-491e-9b74-f2184369cadf& - Accept-Language en-US,en;q=0.5 @@ -4634,10 +4402,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/pages/resumedraft.action?draftId=173736329&draftShareId=f32d5da6-341a-491e-9b74-f2184369cadf& - Accept-Language en-US,en;q=0.5 @@ -4695,7 +4459,7 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - ${application.postfix}${x_new_title_blog} + ${application.postfix}/${x_new_title_blog} GET true false @@ -4708,10 +4472,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/pages/resumedraft.action?draftId=173736329&draftShareId=f32d5da6-341a-491e-9b74-f2184369cadf& - Accept-Language en-US,en;q=0.5 @@ -4774,10 +4534,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -4834,10 +4590,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -4887,10 +4639,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -4945,10 +4693,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5009,10 +4753,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5065,10 +4805,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5133,10 +4869,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5197,10 +4929,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5246,10 +4974,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5291,10 +5015,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5359,10 +5079,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5451,10 +5167,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5507,10 +5219,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5567,10 +5275,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/2018/04/17/Test+Blog+1 - Accept-Language en-US,en;q=0.5 @@ -5663,10 +5367,6 @@ vars.put("p_new_file_name", (new Random().with {(1..9).collect {((&apo - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/pages/resumedraft.action?draftId=175374338&draftShareId=b74521fb-1e06-4def-8218-d81ee02cdef4& - Accept-Language en-US,en;q=0.5 @@ -5773,10 +5473,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+1 - Accept-Language en-US,en;q=0.5 @@ -5868,10 +5564,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051&src=quick-create - Accept-Language en-US,en;q=0.5 @@ -5928,10 +5620,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051&src=quick-create - Accept-Language en-US,en;q=0.5 @@ -5988,10 +5676,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051&src=quick-create - Accept-Language en-US,en;q=0.5 @@ -6041,10 +5725,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051&src=quick-create - Accept-Language en-US,en;q=0.5 @@ -6098,10 +5778,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051 - Accept-Language en-US,en;q=0.5 @@ -6155,10 +5831,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051 - Accept-Language en-US,en;q=0.5 @@ -6212,10 +5884,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051 - Accept-Language en-US,en;q=0.5 @@ -6269,10 +5937,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051 - Accept-Language en-US,en;q=0.5 @@ -6325,10 +5989,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051 - Accept-Language en-US,en;q=0.5 @@ -6414,10 +6074,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/createpage.action?spaceKey=~qpham&fromPageId=173441051 - Accept-Language en-US,en;q=0.5 @@ -6515,10 +6171,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/pages/resumedraft.action?draftId=173441052&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -6588,10 +6240,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/pages/resumedraft.action?draftId=173441052&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -6705,10 +6353,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/pages/resumedraft.action?draftId=173441052&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -6758,10 +6402,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -6818,10 +6458,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -6886,10 +6522,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -6954,10 +6586,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7018,10 +6646,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7082,10 +6706,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7146,10 +6766,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7203,10 +6819,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7259,10 +6871,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7319,10 +6927,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7415,10 +7019,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7471,10 +7071,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7531,10 +7127,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7591,10 +7183,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~qpham/Test+Performance+2 - Accept-Language en-US,en;q=0.5 @@ -7658,10 +7246,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~bmcnamara/Collaborate+Now - Accept-Language en-US,en;q=0.5 @@ -7805,10 +7389,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -7890,10 +7470,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -7958,10 +7534,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -8015,10 +7587,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -8100,10 +7668,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -8161,10 +7725,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/pages/resumedraft.action?draftId=0&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -8218,10 +7778,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/pages/resumedraft.action?draftId=0&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -8303,10 +7859,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/pages/resumedraft.action?draftId=0&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -8402,10 +7954,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/pages/resumedraft.action?draftId=0&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -8522,10 +8070,6 @@ vars.put("p_page_version", page_version.toString()); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/pages/resumedraft.action?draftId=0&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -8608,10 +8152,6 @@ vars.put("p_page_version", page_version.toString()); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/pages/resumedraft.action?draftId=0&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -8712,10 +8252,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/pages/resumedraft.action?draftId=0&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -8790,10 +8326,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/pages/resumedraft.action?draftId=0&draftShareId=& - Accept-Language en-US,en;q=0.5 @@ -8843,10 +8375,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -8903,10 +8431,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -8971,10 +8495,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9039,10 +8559,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9103,10 +8619,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9167,10 +8679,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9259,10 +8767,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9323,10 +8827,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9380,10 +8880,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9436,10 +8932,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9496,10 +8988,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9556,10 +9044,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9616,10 +9100,6 @@ if (totalAncestorID > 0) - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -9726,10 +9206,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/viewpage.action?pageId=10354815 - Accept-Language en-US,en;q=0.5 @@ -9849,10 +9325,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/display/~admin/Test+-+Performance - Accept-Language en-US,en;q=0.5 @@ -10014,10 +9486,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/viewpageattachments.action?pageId=173309964 - Accept-Language en-US,en;q=0.5 @@ -10126,10 +9594,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.protocol}://${application.hostname}/pages/viewpage.action?pageId=2606119446 - Accept-Language en-US,en;q=0.5 @@ -10191,10 +9655,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/viewpage.action?pageId=83492986 - Accept-Language en-US,en;q=0.5 @@ -10251,10 +9711,6 @@ vars.put("extend_action", extend_action); - - Referer - ${application.port}://${application.hostname}:${application.port}/${application.postfix}/pages/viewpage.action?pageId=83492986 - Accept-Language en-US,en;q=0.5 diff --git a/app/selenium_ui/confluence-ui.py b/app/selenium_ui/confluence-ui.py index 9ad030382..64d0376bf 100644 --- a/app/selenium_ui/confluence-ui.py +++ b/app/selenium_ui/confluence-ui.py @@ -1,4 +1,5 @@ from selenium_ui.confluence import modules +from extension.confluence import extension_ui # this action should be the first one @@ -30,11 +31,13 @@ def test_1_selenium_view_dashboard(webdriver, confluence_datasets, confluence_sc modules.view_dashboard(webdriver, confluence_datasets) -""" Add custom actions anywhere between login and log out action. Move this to a different line as needed. - Write your custom selenium scripts in `../extension/extension.py`. Refer to `modules.py` for examples. +""" +Add custom actions anywhere between login and log out action. Move this to a different line as needed. +Write your custom selenium scripts in `app/extension/confluence/extension_ui.py`. +Refer to `app/selenium_ui/confluence/modules.py` for examples. """ # def test_1_selenium_custom_action(webdriver, confluence_datasets, confluence_screen_shots): -# modules.custom_action(webdriver, confluence_datasets) +# extension_ui.custom_action(webdriver, confluence_datasets) # this action should be the last one diff --git a/app/selenium_ui/confluence/modules.py b/app/selenium_ui/confluence/modules.py index 64ec9c900..8449d955f 100644 --- a/app/selenium_ui/confluence/modules.py +++ b/app/selenium_ui/confluence/modules.py @@ -2,7 +2,7 @@ import time from selenium.webdriver.common.by import By -from selenium.webdriver.support import expected_conditions as EC +from selenium.webdriver.support import expected_conditions as ec from selenium.webdriver.support.wait import WebDriverWait from selenium_ui.conftest import AnyEc, generate_random_string, print_timing @@ -29,7 +29,7 @@ def measure(webdriver, interaction): @print_timing def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/login.action') - _wait_until(webdriver, EC.visibility_of_element_located((By.ID, 'loginButton')), interaction) + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, 'loginButton')), interaction) measure(webdriver, "selenium_login:open_login_page") @@ -45,28 +45,28 @@ def _user_setup(): current_step_sel = 'grow-aui-progress-tracker-step-current' if webdriver.find_element_by_class_name(current_step_sel).text == 'Welcome': _wait_until(webdriver, - EC.element_to_be_clickable((By.ID, 'grow-intro-video-skip-button')), + ec.element_to_be_clickable((By.ID, 'grow-intro-video-skip-button')), interaction).click() if webdriver.find_element_by_class_name(current_step_sel).text == 'Upload your photo': _wait_until(webdriver, - EC.element_to_be_clickable((By.CSS_SELECTOR, '.aui-button-link')), + ec.element_to_be_clickable((By.CSS_SELECTOR, '.aui-button-link')), interaction).click() if webdriver.find_element_by_class_name(current_step_sel).text == 'Find content': _wait_until(webdriver, - EC.visibility_of_any_elements_located( + ec.visibility_of_any_elements_located( (By.CSS_SELECTOR, '.intro-find-spaces-space>.space-checkbox')), interaction)[0].click() _wait_until(webdriver, - EC.element_to_be_clickable((By.CSS_SELECTOR, '.intro-find-spaces-button-continue')), + ec.element_to_be_clickable((By.CSS_SELECTOR, '.intro-find-spaces-button-continue')), interaction).click() @print_timing def measure(webdriver, interaction): webdriver.find_element_by_id('loginButton').click() - _wait_until(webdriver, EC.invisibility_of_element_located((By.ID, 'loginButton')), interaction) + _wait_until(webdriver, ec.invisibility_of_element_located((By.ID, 'loginButton')), interaction) if _setup_page_is_presented(): _user_setup() - _wait_until(webdriver, EC.presence_of_element_located((By.CLASS_NAME, 'list-container-all-updates')), + _wait_until(webdriver, ec.presence_of_element_located((By.CLASS_NAME, 'list-container-all-updates')), interaction) measure(webdriver, "selenium_login:login_and_view_dashboard") # waits for all updates @@ -84,7 +84,7 @@ def view_page(webdriver, datasets): @print_timing def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/pages/viewpage.action?pageId={page}') - _wait_until(webdriver, EC.visibility_of_element_located((By.ID, 'title-text')), interaction) + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, 'title-text')), interaction) measure(webdriver, "selenium_view_page") @@ -95,7 +95,7 @@ def view_blog(webdriver, datasets): @print_timing def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/pages/viewpage.action?pageId={blog}') - _wait_until(webdriver, EC.visibility_of_element_located((By.ID, 'title-text')), interaction) + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, 'title-text')), interaction) measure(webdriver, "selenium_view_blog") @@ -104,7 +104,7 @@ def view_dashboard(webdriver, datasets): @print_timing def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/dashboard.action#all-updates') - _wait_until(webdriver, EC.visibility_of_element_located((By.CLASS_NAME, 'update-items')), interaction) + _wait_until(webdriver, ec.visibility_of_element_located((By.CLASS_NAME, 'update-items')), interaction) measure(webdriver, "selenium_view_dashboard") @@ -113,10 +113,10 @@ def create_page(webdriver, datasets): @print_timing def measure(webdriver, interaction): webdriver.find_element(By.ID, "quick-create-page-button").click() - _wait_until(webdriver, EC.element_to_be_clickable((By.ID, 'rte-button-publish')), interaction) + _dismiss_popup(webdriver, "#closeDisDialog") + _wait_until(webdriver, ec.element_to_be_clickable((By.ID, 'rte-button-publish')), interaction) measure(webdriver, "selenium_create_page:open_create_page_editor") - _dismiss_popup(webdriver, "#closeDisDialog") populate_page_title(webdriver) populate_page_content(webdriver) @@ -124,7 +124,7 @@ def measure(webdriver, interaction): @print_timing def measure(webdriver, interaction): webdriver.find_element_by_id("rte-button-publish").click() - _wait_until(webdriver, EC.visibility_of_element_located((By.ID, 'title-text')), interaction) + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, 'title-text')), interaction) measure(webdriver, "selenium_create_page:save_created_page") @@ -136,10 +136,11 @@ def edit_page(webdriver, datasets): def measure(webdriver, interaction): webdriver.get(f'{APPLICATION_URL}/pages/editpage.action?pageId={page}') _wait_until(webdriver, - EC.text_to_be_present_in_element((By.CLASS_NAME, 'status-indicator-message'), 'Ready to go'), - interaction) + AnyEc(ec.text_to_be_present_in_element((By.CLASS_NAME, 'status-indicator-message'), 'Ready to go'), + ec.text_to_be_present_in_element((By.CLASS_NAME, 'status-indicator-message'), 'Changes saved') + ), interaction) - _wait_until(webdriver, EC.element_to_be_clickable((By.ID, 'rte-button-publish')), interaction) + _wait_until(webdriver, ec.element_to_be_clickable((By.ID, 'rte-button-publish')), interaction) measure(webdriver, "selenium_edit_page:open_create_page_editor") @@ -152,9 +153,9 @@ def measure(webdriver, interaction): if webdriver.find_elements_by_id(confirmation_button): if webdriver.find_element_by_id('qed-publish-button').is_displayed(): webdriver.find_element_by_id('qed-publish-button').click() - _wait_until(webdriver, EC.invisibility_of_element_located((By.ID, 'rte-spinner')), interaction) - _wait_until(webdriver, AnyEc(EC.presence_of_element_located((By.ID, "title-text")), - EC.presence_of_element_located((By.ID, confirmation_button)) + _wait_until(webdriver, ec.invisibility_of_element_located((By.ID, 'rte-spinner')), interaction) + _wait_until(webdriver, AnyEc(ec.presence_of_element_located((By.ID, "title-text")), + ec.presence_of_element_located((By.ID, confirmation_button)) ), interaction) measure(webdriver, "selenium_edit_page:save_edited_page") @@ -165,15 +166,10 @@ def create_comment(webdriver, datasets): @print_timing def measure(webdriver, interaction): - create_comment_button = webdriver.find_element(By.CSS_SELECTOR, ".quick-comment-prompt") - webdriver.execute_script("arguments[0].scrollIntoView()", create_comment_button) - # create_comment_button.click() webdriver.execute_script("document.querySelector('.quick-comment-prompt').click()") - _wait_until(webdriver, EC.invisibility_of_element_located(create_comment_button), interaction) - - _wait_until(webdriver, EC.element_to_be_clickable((By.ID, 'rte-button-publish')), interaction) - _wait_until(webdriver, EC.frame_to_be_available_and_switch_to_it((By.ID, 'wysiwygTextarea_ifr')), interaction) - webdriver.find_element_by_id("tinymce").send_keys(f"This is page comment from date {time.time()}") + _wait_until(webdriver, ec.frame_to_be_available_and_switch_to_it((By.ID, 'wysiwygTextarea_ifr')), interaction) + webdriver.find_element_by_id("tinymce").find_element_by_tag_name('p')\ + .send_keys(f"This is page comment from date {time.time()}") webdriver.switch_to.parent_frame() measure(webdriver, 'selenium_create_comment:write_comment') @@ -181,14 +177,14 @@ def measure(webdriver, interaction): @print_timing def measure(webdriver, interaction): webdriver.find_element_by_id("rte-button-publish").click() - _wait_until(webdriver, EC.visibility_of_element_located((By.CSS_SELECTOR, '.quick-comment-prompt')), + _wait_until(webdriver, ec.visibility_of_element_located((By.CSS_SELECTOR, '.quick-comment-prompt')), interaction) measure(webdriver, "selenium_create_comment:save_comment") def populate_page_title(webdriver): - _wait_until(webdriver, EC.visibility_of_element_located((By.ID, 'content-title')), 'populate page title') + _wait_until(webdriver, ec.visibility_of_element_located((By.ID, 'content-title')), 'populate page title') title = "Selenium - " + generate_random_string(10) webdriver.find_element_by_id("content-title").clear() webdriver.find_element_by_id("content-title").send_keys(title) @@ -196,7 +192,7 @@ def populate_page_title(webdriver): def populate_page_content(webdriver): _wait_until(webdriver, - EC.frame_to_be_available_and_switch_to_it((By.ID, 'wysiwygTextarea_ifr')), 'populate page content') + ec.frame_to_be_available_and_switch_to_it((By.ID, 'wysiwygTextarea_ifr')), 'populate page content') webdriver.find_element_by_id("tinymce").find_element_by_tag_name('p').send_keys(generate_random_string(30)) webdriver.switch_to.parent_frame() @@ -219,11 +215,11 @@ def _wait_until(webdriver, expected_condition, interaction, time_out=timeout): message += f"Timed out after {time_out} sec waiting for one of the conditions: \n{conditions_text}" - elif ec_type == EC.invisibility_of_element_located: + elif ec_type == ec.invisibility_of_element_located: message += (f"Timed out after {time_out} sec waiting for {str(expected_condition)}. \n" f"Locator: {expected_condition.target}") - elif ec_type == EC.frame_to_be_available_and_switch_to_it: + elif ec_type == ec.frame_to_be_available_and_switch_to_it: message += (f"Timed out after {time_out} sec waiting for {str(expected_condition)}. \n" f"Locator: {expected_condition.frame_locator}") diff --git a/app/selenium_ui/jira_ui.py b/app/selenium_ui/jira_ui.py index 1aa44850a..6f80c870b 100644 --- a/app/selenium_ui/jira_ui.py +++ b/app/selenium_ui/jira_ui.py @@ -1,4 +1,5 @@ from selenium_ui.jira import modules +from extension.jira import extension_ui # this action should be the first one @@ -54,13 +55,13 @@ def test_1_selenium_view_project_summary(webdriver, jira_datasets, jira_screen_s modules.view_project_summary(webdriver, jira_datasets) -""" Add custom actions anywhere between login and log out action. Move this to a different line as needed. - Write your custom selenium scripts in `../extension/extension.py`. Refer to `modules.py` for examples. """ - - -# def test_1_selenium_custom_action(webdriver, jira_datasets, screen_shots): -# modules.custom_action(webdriver, jira_datasets) +Add custom actions anywhere between login and log out action. Move this to a different line as needed. +Write your custom selenium scripts in `app/extension/jira/extension_ui.py`. +Refer to `app/selenium_ui/jira/modules.py` for examples. +""" +# def test_1_selenium_custom_action(webdriver, jira_datasets, jira_screen_shots): +# extension_ui.custom_action(webdriver, jira_datasets) # this action should be the last one diff --git a/app/util/analytics.py b/app/util/analytics.py new file mode 100644 index 000000000..ffa6afdd5 --- /dev/null +++ b/app/util/analytics.py @@ -0,0 +1,242 @@ +import sys +import os +import re +import requests +from datetime import datetime +import platform +import uuid +import getpass +import socket +import hashlib + +from util.conf import JIRA_SETTINGS, CONFLUENCE_SETTINGS, TOOLKIT_VERSION +from util.data_preparation.api.jira_clients import JiraRestClient +from util.data_preparation.api.confluence_clients import ConfluenceRestClient + +JIRA = 'jira' +CONFLUENCE = 'confluence' +BITBUCKET = 'bitbucket' + +# List in value in case of specific output appears for some OS for command platform.system() +OS = {'macOS': ['Darwin'], 'Windows': ['Windows'], 'Linux': ['Linux']} +DT_REGEX = r'(\d{4}-\d{1,2}-\d{1,2}\s+\d{1,2}:\d{1,2}:\d{1,2})' +SUCCESS_TEST_RATE_REGX = r'(\d{1,3}.\d{1,2}%)' +JMETER_TEST_REGX = r'jmeter_\S*' +SELENIUM_TEST_REGX = r'selenium_\S*' +BASE_URL = 'https://s7hdm2mnj1.execute-api.us-east-2.amazonaws.com/default/analytics_collector' + + +APP_TYPE_MSG = 'Please run util/analytics.py with application type as argument. E.g. python util/analytics.py jira' + + +def __validate_app_type(): + try: + app_type = sys.argv[1] + if app_type.lower() not in [JIRA, CONFLUENCE, BITBUCKET]: + raise SystemExit(APP_TYPE_MSG) + except IndexError: + SystemExit(APP_TYPE_MSG) + + +def get_application_type(): + __validate_app_type() + return sys.argv[1] + + +class AnalyticsCollector: + + def __init__(self, application_type): + self.application_type = application_type + self.run_id = str(uuid.uuid1()) + self.tool_version = "" + self.os = "" + self.duration = 0 + self.concurrency = 0 + self.actual_duration = 0 + self.selenium_test_rates = 0 + self.jmeter_test_rates = 0 + self.time_stamp = "" + self.date = "" + self.application_version = "" + + @property + def config_yml(self): + if self.application_type.lower() == JIRA: + return JIRA_SETTINGS + if self.application_type.lower() == CONFLUENCE: + return CONFLUENCE_SETTINGS + # TODO Bitbucket the same approach + + @property + def _log_dir(self): + if 'TAURUS_ARTIFACTS_DIR' in os.environ: + return os.environ.get('TAURUS_ARTIFACTS_DIR') + else: + raise SystemExit('Taurus result directory could not be found') + + @property + def bzt_log_file(self): + with open(f'{self._log_dir}/bzt.log') as log_file: + log_file = log_file.readlines() + return log_file + + @staticmethod + def get_os(): + os_type = platform.system() + for key, value in OS.items(): + os_type = key if os_type in value else os_type + return os_type + + def is_analytics_enabled(self): + return str(self.config_yml.analytics_collector).lower() in ['yes', 'true', 'y'] + + def __validate_bzt_log_not_empty(self): + if len(self.bzt_log_file) == 0: + raise SystemExit(f'bzt.log file in {self._log_dir} is empty') + + def get_duration_by_start_finish_strings(self): + first_string = self.bzt_log_file[0] + last_string = self.bzt_log_file[-1] + start_time = re.findall(DT_REGEX, first_string)[0] + start_datetime_obj = datetime.strptime(start_time, '%Y-%m-%d %H:%M:%S') + finish_time = re.findall(DT_REGEX, last_string)[0] + finish_datetime_obj = datetime.strptime(finish_time, '%Y-%m-%d %H:%M:%S') + duration = finish_datetime_obj - start_datetime_obj + return duration.seconds + + def get_duration_by_test_duration(self): + test_duration = None + for string in self.bzt_log_file: + if 'Test duration' in string: + str_duration = string.split('duration:')[1].replace('\n', '') + str_duration = str_duration.replace(' ', '') + duration_datetime_obj = datetime.strptime(str_duration, '%H:%M:%S') + test_duration = (duration_datetime_obj.hour*3600 + + duration_datetime_obj.minute*60 + duration_datetime_obj.second) + break + return test_duration + + def get_actual_run_time(self): + self.__validate_bzt_log_not_empty() + run_time_bzt = self.get_duration_by_test_duration() + run_time_start_finish = self.get_duration_by_start_finish_strings() + return run_time_bzt if run_time_bzt else run_time_start_finish + + @staticmethod + def get_test_count_by_type(tests_type, log): + trigger = f' {tests_type}_' + test_search_regx = "" + if tests_type == 'jmeter': + test_search_regx = JMETER_TEST_REGX + elif tests_type == 'selenium': + test_search_regx = SELENIUM_TEST_REGX + tests = {} + for line in log: + if trigger in line and ('FAIL' in line or 'OK' in line): + test_name = re.findall(test_search_regx, line)[0] + test_rate = float(''.join(re.findall(SUCCESS_TEST_RATE_REGX, line))[:-1]) + if test_name not in tests: + tests[test_name] = test_rate + return tests + + def set_actual_test_count(self): + test_result_string_trigger = 'Request label stats:' + res_string_idx = [index for index, value in enumerate(self.bzt_log_file) if test_result_string_trigger in value] + # Cut bzt.log from the 'Request label stats:' string to the end + if res_string_idx: + res_string_idx = res_string_idx[0] + results_bzt_run = self.bzt_log_file[res_string_idx:] + + self.selenium_test_rates = self.get_test_count_by_type(tests_type='selenium', log=results_bzt_run) + self.jmeter_test_rates = self.get_test_count_by_type(tests_type='jmeter', log=results_bzt_run) + + @staticmethod + def __convert_to_sec(duration): + seconds_per_unit = {"s": 1, "m": 60, "h": 3600, "d": 86400, "w": 604800} + duration = str(duration) + numbers = ''.join(filter(str.isdigit, duration)) + units = ''.join(filter(str.isalpha, duration)) + return int(numbers) * seconds_per_unit[units] if units in seconds_per_unit else int(numbers) + + def set_date_timestamp(self): + utc_now = datetime.utcnow() + self.time_stamp = int(round(utc_now.timestamp() * 1000)) + self.date = utc_now.strftime("%m/%d/%Y-%H:%M:%S") + + def get_jira_version(self): + client = JiraRestClient(host=self.config_yml.server_url, user=self.config_yml.admin_login, + password=self.config_yml.admin_password) + jira_server_info = client.get_server_info() + jira_server_version = jira_server_info.get('version', '') + return jira_server_version + + def get_confluence_version(self): + client = ConfluenceRestClient(host=self.config_yml.server_url, user=self.config_yml.admin_login, + password=self.config_yml.admin_password) + confluence_server_version = client.get_confluence_version() + return confluence_server_version + + def get_application_version(self): + if self.application_type.lower() == JIRA: + return self.get_jira_version() + if self.application_type.lower() == CONFLUENCE: + return self.get_confluence_version() + # TODO Bitbucket the same approach + + @property + def uniq_user_id(self): + user_info = str(platform.node()) + str(getpass.getuser()) + str(socket.gethostname()) + uid = hashlib.pbkdf2_hmac('sha256', user_info.encode('utf-8'), + b"DCAPT Centaurus", + 100000).hex() + return uid + + def generate_analytics(self): + self.concurrency = self.config_yml.concurrency + self.duration = self.__convert_to_sec(self.config_yml.duration) + self.os = self.get_os() + self.actual_duration = self.get_actual_run_time() + self.tool_version = TOOLKIT_VERSION + self.set_actual_test_count() + self.set_date_timestamp() + self.application_version = self.get_application_version() + + +class AnalyticsSender: + + def __init__(self, analytics_instance): + self.analytics = analytics_instance + + def send_request(self): + headers = {"Content-Type": "application/json"} + payload = {"run_id": self.analytics.run_id, + "user_id": self.analytics.uniq_user_id, + "app_version": self.analytics.application_version, + "date": self.analytics.date, + "time_stamp": self.analytics.time_stamp, + "app_type": self.analytics.application_type, + "os": self.analytics.os, + "tool_ver": self.analytics.tool_version, + "exp_dur": self.analytics.duration, + "act_dur": self.analytics.actual_duration, + "selenium_test_rates": self.analytics.selenium_test_rates, + "jmeter_test_rates": self.analytics.jmeter_test_rates, + "concurrency": self.analytics.concurrency + } + r = requests.post(url=f'{BASE_URL}', json=payload, headers=headers) + print(r.json()) + if r.status_code != 200: + print(f'Analytics data was send unsuccessfully, status code {r.status_code}') + + +def main(): + app_type = get_application_type() + collector = AnalyticsCollector(app_type) + if collector.is_analytics_enabled(): + collector.generate_analytics() + sender = AnalyticsSender(collector) + sender.send_request() + + +if __name__ == '__main__': + main() diff --git a/app/util/conf.py b/app/util/conf.py index 93c221b24..ee4873207 100644 --- a/app/util/conf.py +++ b/app/util/conf.py @@ -2,6 +2,8 @@ from util.project_paths import JIRA_YML, CONFLUENCE_YML +TOOLKIT_VERSION = '1.2.0' + def read_yml_file(file): with file.open(mode='r') as file: @@ -12,13 +14,16 @@ class JiraSettings: def __init__(self): obj = read_yml_file(JIRA_YML) - self.hostname = obj['settings']['env']['application_hostname'] - self.protocol = obj['settings']['env']['application_protocol'] - self.port = obj['settings']['env']['application_port'] - self.postfix = obj['settings']['env']['application_postfix'] or "" - self.admin_login = obj['settings']['env']['admin_login'] - self.admin_password = obj['settings']['env']['admin_password'] - self.concurrency = obj['settings']['env']['concurrency'] + env_settings = obj['settings']['env'] + self.hostname = env_settings['application_hostname'] + self.protocol = env_settings['application_protocol'] + self.port = env_settings['application_port'] + self.postfix = env_settings['application_postfix'] or "" + self.admin_login = env_settings['admin_login'] + self.admin_password = env_settings['admin_password'] + self.concurrency = env_settings['concurrency'] + self.duration = env_settings['test_duration'] + self.analytics_collector = env_settings['allow_analytics'] @property def server_url(self): @@ -29,13 +34,16 @@ class ConfluenceSettings: def __init__(self): obj = read_yml_file(CONFLUENCE_YML) - self.hostname = obj['settings']['env']['application_hostname'] - self.protocol = obj['settings']['env']['application_protocol'] - self.port = obj['settings']['env']['application_port'] - self.postfix = obj['settings']['env']['application_postfix'] or "" - self.admin_login = obj['settings']['env']['admin_login'] - self.admin_password = obj['settings']['env']['admin_password'] - self.concurrency = obj['settings']['env']['concurrency'] + env_settings = obj['settings']['env'] + self.hostname = env_settings['application_hostname'] + self.protocol = env_settings['application_protocol'] + self.port = env_settings['application_port'] + self.postfix = env_settings['application_postfix'] or "" + self.admin_login = env_settings['admin_login'] + self.admin_password = env_settings['admin_password'] + self.concurrency = env_settings['concurrency'] + self.duration = env_settings['test_duration'] + self.analytics_collector = env_settings['allow_analytics'] @property def server_url(self): diff --git a/app/util/confluence/populate_db.sh b/app/util/confluence/populate_db.sh index 82df2f9e9..ba3f1fcfa 100644 --- a/app/util/confluence/populate_db.sh +++ b/app/util/confluence/populate_db.sh @@ -18,7 +18,7 @@ CONFLUENCE_DB_USER="postgres" CONFLUENCE_DB_PASS="Password1!" # Confluence version variables -SUPPORTED_CONFLUENCE_VERSIONS=(6.13.8) +SUPPORTED_CONFLUENCE_VERSIONS=(6.13.8 7.0.4) CONFLUENCE_VERSION=$(sudo su confluence -c "cat ${CONFLUENCE_VERSION_FILE}") echo "Confluence Version: ${CONFLUENCE_VERSION}" diff --git a/app/util/confluence/upload_attachments.sh b/app/util/confluence/upload_attachments.sh index f723a2354..c569be64c 100644 --- a/app/util/confluence/upload_attachments.sh +++ b/app/util/confluence/upload_attachments.sh @@ -4,7 +4,7 @@ ################### Variables section ################### # Confluence version variables CONFLUENCE_VERSION_FILE="/media/atl/confluence/shared-home/confluence.version" -SUPPORTED_CONFLUENCE_VERSIONS=(6.13.8) +SUPPORTED_CONFLUENCE_VERSIONS=(6.13.8 7.0.4) CONFLUENCE_VERSION=$(sudo su confluence -c "cat ${CONFLUENCE_VERSION_FILE}") echo "Confluence Version: ${CONFLUENCE_VERSION}" diff --git a/app/util/data_preparation/api/confluence_clients.py b/app/util/data_preparation/api/confluence_clients.py index 3ef98b6d6..cfe18a2ed 100644 --- a/app/util/data_preparation/api/confluence_clients.py +++ b/app/util/data_preparation/api/confluence_clients.py @@ -1,7 +1,7 @@ import xmlrpc.client from util.data_preparation.api.abstract_clients import RestClient, Client - +import xml.etree.ElementTree as ET BATCH_SIZE_SEARCH = 500 @@ -84,6 +84,16 @@ def get_users(self, prefix, count): users_list = self.search(f"user~{prefix}", limit=count) return users_list + def get_confluence_version(self): + version = '' + api_url = f'{self.host}/rest/applinks/1.0/manifest' + response = self.get(api_url, 'Could not get Confluence manifest') + tree = ET.fromstring(response.content) + for child in tree: + if child.tag == 'version': + version = child.text + return version + def search(self, cql, cqlcontext=None, expand=None, start=0, limit=500): """ Fetch a list of content using the Confluence Query Language (CQL). diff --git a/app/util/data_preparation/api/jira_clients.py b/app/util/data_preparation/api/jira_clients.py index 0de0c720e..448b4e6e2 100644 --- a/app/util/data_preparation/api/jira_clients.py +++ b/app/util/data_preparation/api/jira_clients.py @@ -139,3 +139,9 @@ def get_all_projects(self): response = self.get(api_url, 'Could not get the list of projects') return response.json() + + def get_server_info(self): + api_url = f'{self.host}/rest/api/2/serverInfo' + response = self.get(api_url, 'Could not get the server information') + + return response.json() diff --git a/app/util/data_preparation/confluence/prepare-data.py b/app/util/data_preparation/confluence/prepare-data.py index a9ff55efc..b2faadfad 100644 --- a/app/util/data_preparation/confluence/prepare-data.py +++ b/app/util/data_preparation/confluence/prepare-data.py @@ -21,7 +21,7 @@ def __create_data_set(rest_client, rpc_client): dataset = dict() dataset[USERS] = __get_users(rest_client, rpc_client, CONFLUENCE_SETTINGS.concurrency) dataset[PAGES] = __get_pages(rest_client, 5000) - dataset[BLOGS] = __get_blogs(rest_client, 500) + dataset[BLOGS] = __get_blogs(rest_client, 5000) return dataset @@ -57,7 +57,9 @@ def __get_pages(confluence_api, count): def __get_blogs(confluence_api, count): - blogs = confluence_api.get_content_search(0, count, cql='type=blogpost') + blogs = confluence_api.get_content_search( + 0, count, cql='type=blogpost' + ' and title !~ Performance') if not blogs: raise SystemExit(f"There is no Blog posts in Confluence") diff --git a/app/util/environment_checker.py b/app/util/environment_checker.py new file mode 100644 index 000000000..d34ca46cf --- /dev/null +++ b/app/util/environment_checker.py @@ -0,0 +1,9 @@ +from sys import version_info + +SUPPORTED_PYTHON_VERSION = (3, 6) + +python_version = version_info[0:2] +if python_version < SUPPORTED_PYTHON_VERSION: + raise Exception( + "Python version {} is not supported. " + "Please use Python version {} or higher.".format(python_version, SUPPORTED_PYTHON_VERSION)) diff --git a/docs/dc-apps-performance-toolkit-user-guide-confluence.md b/docs/dc-apps-performance-toolkit-user-guide-confluence.md index 7fcc06019..b5bd2c687 100644 --- a/docs/dc-apps-performance-toolkit-user-guide-confluence.md +++ b/docs/dc-apps-performance-toolkit-user-guide-confluence.md @@ -38,6 +38,18 @@ You are responsible for the cost of the AWS services used while running this Qui To reduce costs, we recommend you to keep your deployment up and running only during the performance runs. +### AWS cost estimation ### +[SIMPLE MONTHLY CALCULATOR](https://calculator.s3.amazonaws.com/index.html) provides an estimate of usage charges for AWS services based on certain information you provide. +Monthly charges will be based on your actual usage of AWS services, and may vary from the estimates the Calculator has provided. + +*The prices below are approximate and may vary depending on factors such as (region, instance type, deployment type of DB, etc.) + +| Stack | Estimated hourly cost ($)| +| ------------------------- | -------------------------| +| One Node Confluence DC | 1,5 - 1,6 | +| Two Nodes Confluence DC | 1,7 - 2,5 | +| Four Nodes Confluence DC | 3,5 - 4,2 | + #### Quick Start parameters All important parameters are listed and described in this section. For all other remaining parameters, we recommend using the Quick Start defaults. @@ -47,11 +59,11 @@ All important parameters are listed and described in this section. For all other | Parameter | Recommended Value | | --------- | ----------------- | | Collaborative editing mode | synchrony-local | -| Confluence Version | 6.13.8 | +| Confluence Version | 6.13.8 or 7.0.4| The Data Center App Performance Toolkit officially supports: -- The latest Confluence Platform Release version: 7.0.x (Coming soon) +- The latest Confluence Platform Release version: 7.0.4 - The latest Confluence [Enterprise Release](https://confluence.atlassian.com/enterprise/atlassian-enterprise-releases-948227420.html): 6.13.8 **Cluster nodes** diff --git a/docs/dc-apps-performance-toolkit-user-guide-jira.md b/docs/dc-apps-performance-toolkit-user-guide-jira.md index e9df926a5..7b81c6d0e 100644 --- a/docs/dc-apps-performance-toolkit-user-guide-jira.md +++ b/docs/dc-apps-performance-toolkit-user-guide-jira.md @@ -38,6 +38,18 @@ You are responsible for the cost of the AWS services used while running this Qui To reduce costs, we recommend you to keep your deployment up and running only during the performance runs. +### AWS cost estimation ### +[SIMPLE MONTHLY CALCULATOR](https://calculator.s3.amazonaws.com/index.html) provides an estimate of usage charges for AWS services based on certain information you provide. +Monthly charges will be based on your actual usage of AWS services, and may vary from the estimates the Calculator has provided. + +*The prices below are approximate and may vary depending on factors such as (region, instance type, deployment type of DB, etc.) + +| Stack | Estimated hourly cost ($)| +| ------------------------- | -------------------------| +| One Node Jira DC | 1 - 1,3 | +| Two Nodes Jira DC | 1,7 - 2,1 | +| Four Nodes Jira DC | 3,1 - 3,8 | + #### Quick Start parameters All important parameters are listed and described in this section. For all other remaining parameters, we recommend using the Quick Start defaults.