diff --git a/docs/configuration/ProjectConfiguration.mdx b/docs/configuration/ProjectConfiguration.mdx index 5a672de9e..e766490b5 100644 --- a/docs/configuration/ProjectConfiguration.mdx +++ b/docs/configuration/ProjectConfiguration.mdx @@ -72,44 +72,120 @@ The "Integration" tab can allow the project to connect ReportPortal with externa For more information on this topic, please refer to [Integration with external systems](/configuration/IntegrationViaPlugin). -### E-mail notifications +### Notifications -The "Notifications" tab provides the administrator with the ability to activate e-mail notifications on the project. +The ‘Notifications’ tab provides the administrator with the ability to activate notifications on the project – through either Email or Slack. -ReportPortal provides a way to add multiple rules with specific conditions. The Notification rule should be unique per project, have a unique parameter set, and specify recipients. For Example: In case, Launch names, attributes). +ReportPortal provides a way to add multiple rules with specific conditions. The notification rule should be unique per Notification group – Email or Slack, have a unique parameter set. For example: In case, Launch names, Attributes. -Permissions: -Users with `ADMINISTRATOR` a role can configure "Notifications" in the Administrate section. -Users with `PROJECT_MANAGER` roles can edit the settings on the project space only. - -To do that, perform the following steps: - -1. Login to the ReportPortal. -2. Navigate to the Project -\> Project "Settings" page. -3. Open the "Notifications" tab and click on a button "Create new notification rule" -4. Enter your email into the "From" field. This email will be used as a notification sender. -5. Select recipients. To do that, start typing any symbols into the "Recipients" field. -You can select an item from the auto-complete tool-tip using the -keyboard (use the "Up" and "Down" arrows and "Enter" button). You can also enter a custom email into the "Recipients" field. To add a custom -email, just enter the email address and press "Enter". -6. The "Launch owner" is selected by default. Uncheck "Launch owner" to exclude -him/her from the notification. -7. Select the "In Case" setting. To do that, select one of the following options from the "In Case" drop-down. -8. Select launches (optional). To do that, start typing any symbols into the "Launch names" field. -You can select an item from the auto-complete tool-tip using the "Up" and "Down" arrows and clicking "Enter" on the keyboard. This is an alternate way you can add a new launch name that does not exist on the project. Several launches names can be selected; the recipients will receive notifications when each of them finishes. -9. Then Select attributes (optional). To do that, start typing any symbols into the "Attribute key" and "Attribute value" fields. The system will suggest the results in the drop-down, after at least 1 symbol is provided. It is also possible to add a new attribute (that does not exist on the project). Several attributes can be selected at once; the corresponding recipients will receive notifications about the launches that have all the specified attributes. -10. Switch ON Notifications -11. The system will activate the "Email notification" option. After the launch is finished, the recipients will receive a notification via email. -12. Add more rules, if needed. Each Notification rule should be unique. -13. You can edit/ copy/enable/disable notification rule by clicking on the appropriate controls on the notification rule. +:::note +Users with ADMINISTRATOR role can configure ‘Notifications’ in the Administrate section.
+Users with PROJECT_MANAGER role can edit the settings on the project space only.
+Users with MEMBER/ OPERATOR/ CUSTOMER project role will not have the capability to edit the project settings, however, they do have the permission to view them. +::: +**Email notifications** -:::note -Users with a `MEMBER`/ `OPERATOR`/ `CUSTOMER` project role will not have the capability to edit the project settings, however, they do have the permissions to view them. +:::tip +For using this functionality be sure that the Email server is configured. For that, go to the Project Settings -> Integrations -> Email Server. ::: + +To create Email notification rule, perform the following steps: + +1. Go to the Project settings -> Notifications. + +2. Choose Email Notification Group. + +3. Click ‘Create Rule’ button. + +4. Fill the form: + +**Rule name** – from 1 to 55 characters, mandatory field + +**Recipients** – optional field + +Start typing any symbols into the ‘Recipients’ field. You can select an item from the auto-complete tooltip using the keyboard (use the ‘Up’ and ‘Down’ arrows and ‘Enter’ button). You can also enter a custom email into the ‘Recipients’ field. To add a custom email, just enter the email address and press ‘Enter’. + +**Launch owner** – optional checkbox + +The ‘Launch owner’ checkbox is selected by default. Uncheck ‘Launch owner’ to exclude him/her from the notification. + +**In case** – optional field, dropdown with the options: + +* Always – notification will be sent upon the launch finish. +* 10% of items have issues – notification will be sent, if more than 10% of items have issues. +* 20% of items have issues – notification will be sent, if more than 20% of items have issues. +* 50% of items have issues – notification will be sent, if more than 50% of items have issues. +* Launch has issues – notification will be sent, if at least 1 item has issues +* Launch has ‘To Investigate’ items – notification will be sent, if at least 1 item has ‘To Investigate’ + +**Launch names** – optional field + +Start typing any symbols into the ‘Launch names’ field. You can select an item from the auto-complete tooltip using the ‘Up’ and ‘Down’ arrows and clicking ‘Enter’ on the keyboard. This is an alternate way you can add a new launch name that does not exist on the project. Several launches names can be selected; the recipients will receive notifications when each of them finishes. + +**Attributes** – optional checkbox + +When the ‘Attributes’ checkbox is checked, user can provide key/value for attributes and select the necessary radio button: + +* All attributes should match +* Any attribute should match + +Start typing any symbols into the ‘Attribute key’ and ‘Attribute value’ fields. The system will suggest the results in the dropdown, after at least 1 symbol is provided. It is also possible to add a new attribute (that does not exist on the project). Several attributes can be selected at once; the corresponding recipients will receive notifications about the launches that have all the specified attributes. + +You can edit/ copy/enable/disable notification rule by clicking on the appropriate controls on the notification rule. + +5. Click on ‘Create’ button. + + + +**Slack notifications** + :::tip -For using this functionality be sure that the E-mail server is configured. +To use this functionality, ensure that the Slack plugin is uploaded and enabled. For that, go to Administrate -> Plugins or contact your instance Administrator. ::: + +To create Slack notification rule, perform the following steps: + +1. Go to the Project settings -> Notifications. + +2. Choose Slack Notification Group. + +3. Click ‘Create Rule’ button. + +4. Fill the form: + +**Rule name** – from 1 to 55 characters, mandatory field + +**Webhook URL** – mandatory field (it is configured on the Slack side) + +**In case** – optional field, dropdown with the options: + +* Always – notification will be sent upon the launch finish. +* 10% of items have issues – notification will be sent, if more than 10% of items have issues. +* 20% of items have issues – notification will be sent, if more than 20% of items have issues. +* 50% of items have issues – notification will be sent, if more than 50% of items have issues. +* Launch has issues – notification will be sent, if at least 1 item has issues +* Launch has ‘To Investigate’ items – notification will be sent, if at least 1 item has ‘To Investigate’ + +**Launch names** – optional field + +Start typing any symbols into the ‘Launch names’ field. You can select an item from the auto-complete tooltip using the ‘Up’ and ‘Down’ arrows and clicking ‘Enter’ on the keyboard. This is an alternate way you can add a new launch name that does not exist on the project. Several launches names can be selected; the recipients will receive notifications when each of them finishes. + +**Attributes** – optional checkbox + +When the ‘Attributes’ checkbox is checked, user can provide key/value for attributes and select the necessary radio button: + +* All attributes should match +* Any attribute should match + +Start typing any symbols into the ‘Attribute key’ and ‘Attribute value’ fields. The system will suggest the results in the dropdown, after at least 1 symbol is provided. It is also possible to add a new attribute (that does not exist on the project). Several attributes can be selected at once; the corresponding recipients will receive notifications about the launches that have all the specified attributes. + +You can edit/ copy/enable/disable notification rule by clicking on the appropriate controls on the notification rule. + +5. Click on ‘Create’ button. + + + ### Custom defect types The "Defect Types" tab allows users with permissions to create custom defect types as subtypes of default defects on the project. diff --git a/docs/configuration/img/EmailNotification.png b/docs/configuration/img/EmailNotification.png new file mode 100644 index 000000000..14e639a1d Binary files /dev/null and b/docs/configuration/img/EmailNotification.png differ diff --git a/docs/configuration/img/SlackNotification.png b/docs/configuration/img/SlackNotification.png new file mode 100644 index 000000000..c702e6cfc Binary files /dev/null and b/docs/configuration/img/SlackNotification.png differ diff --git a/docs/issues-troubleshooting/EmailNotificationIssues.md b/docs/issues-troubleshooting/EmailNotificationIssues.md new file mode 100644 index 000000000..949032708 --- /dev/null +++ b/docs/issues-troubleshooting/EmailNotificationIssues.md @@ -0,0 +1,20 @@ +# Email Notification Issues + +In case of observing issues with email notifications when email service stopped processing messages, RP administrators should be aware of some kinds of known issue types: + +1. ThreadPoolTaskExecutor capacity is too small for handling large number of queued users to be notified. + +**Solution:**
+Update environment variable rp_environment_variable_executor_pool_user-email_queue with bigger value (default: 1000). + +2. The number of ThreadPoolTaskExecutor active threads is bigger than the number of simultaneous connections allowed by SMTP server (e.g., 10 maximum connections for gmail). That makes email server consider such heavy load as DDoS attack and refuse to establish new connections. + +**Solution:**
+Decrease number of active threads by updating environment variable rp_environment_variable_executor_pool_user-email_max (default: 10) + +In order to update environment variables, you should edit your docker-compose.yml file.
+[Job environment variables example for docker](https://github.com/reportportal/reportportal/blob/2b22c61f87674aaf2efc7a973af38004c2517680/docker-compose.yml#L201) + +:::note +In addition, there are daily limits on sending emails from one account. Different email servers have their own restrictions (e.g. 2000 max messages for gmail). +::: diff --git a/docs/log-data-in-reportportal/ImportDataToReportPortal.mdx b/docs/log-data-in-reportportal/ImportDataToReportPortal.mdx index 3e7f0258d..53d9e22bb 100644 --- a/docs/log-data-in-reportportal/ImportDataToReportPortal.mdx +++ b/docs/log-data-in-reportportal/ImportDataToReportPortal.mdx @@ -5,58 +5,79 @@ sidebar_label: Import data to ReportPortal # Import data to ReportPortal +## Import via UI + Import functionality gives the opportunity to upload log files via UI. -To start the import process, you should hit the 'Import' button on the Launch page (All Launches tab). In a new pop-up window **'Import Launch'** you can drop files or add them by adding a link. + +To start the import process, you should have at least one import plugin enabled: either JUnit or RobotFramework. + +To import launch via UI: + +1. Log in to ReportPortal. + +2. Go to the Launches page. + +3. Click ‘Import’ button. + +4. Select appropriate option in the ‘Report Type’ dropdown on the ‘Import launch’ modal window. + +5. Click the drag-and-drop area to add .xml or .zip file under 32MB. + +6. Click ‘Import’ button and then ‘OK’ button on the ‘Import launch’ modal window. ReportPortal checks file size and format first. Imported files should meet the following requirements: + * File format is zip archive or XML file. * File size is up to 32Mb. * Timestamp format is 2022-11-17T10:15:43 -If the file format is incorrect, it is marked in red and the reason is shown in the tooltip on hovering over the file in the pop-up window. This is to prevent any incorrect files from being run through the import process. +If the file format is incorrect, it is marked in red, and the reason is shown in the tooltip on hovering over the file in the pop-up window. This is to prevent any incorrect files from being run through the import process. + +If all the files added are correct you may click the 'Import' or 'Cancel' buttons: -If all the files added are correct you may hit the 'Import' or 'Cancel' buttons: * The Cancel button closes the pop-up window without any operation under log files. -* The Import button starts copying files into the RP file storage and disables the 'Import' button. +* The Import button starts copying files into the RP file storage. The System will start copying files into the RP file storage if the files meet the following requirements: -* The File format is a zip archive. + +* The File format is a zip archive or XML file. * The File size is up to 32Mb. -* The XML files must have the JUnit structure in the zip archive. +* The XML files must have the JUnit or RobotFramework structure in the zip archive and in XML files depend on Report Type you have chosen. -The system copies valid XML files into RP file storage and marked them in green in the Import pop-up window. +The system copies valid XML files into RP file storage and marked them in green in the ‘Import launches’ pop-up window. If files from the zip archive have formats other than XML, the system will skip them. -If the XML file is not in the JUnit structure, the system will interrupt the process of copying and mark the file in red. The reason is then shown on the tooltip when hovering the file in the pop-up window. +If the XML file is not in the correct structure (depend on Report Type – JUnit or RobotFramework), the system will interrupt the process of copying and mark the file in red. The reason is then shown on the tooltip when hovering the file in the pop-up window. :::note -Files that were copied earlier stay in the RP file storage +Files that were copied earlier stay in the RP file storage. ::: -When all of the valid log files are downloaded and processed the 'OK' button is enabled. The 'OK' button closes the Import launches pop-up window. The Zip archive is then deleted after the Import is finished or canceled. - +When all valid log files are downloaded and processed, the 'OK' button is enabled. The 'OK' button closes the ‘Import launches’ pop-up window. + + -You can only interrupt the import in UI when files are being downloaded into the RP file storage. In this case, you should hit the 'Cancel' button (or X button in the pop-up window) and confirm the cancellation of import and then hit the 'Cancel' button again. +You can only interrupt the import in UI when files are being downloaded into the RP file storage. In this case, you should click the 'Cancel' button (or X button in the pop-up window) and confirm the cancellation of import and then click the 'Cancel' button again. - + ## Import via API -The details about import via API you can find on the ReportPortal menu at the bottom: API -> launch controller -> Import junit xml report +The details about import via API you can find on the ReportPortal menu at the bottom: API -> Plugin Controller -> Send report to the specified plugin for importing - + You can configure parameters (name, description, attributes) for the imported launch by specifying these values in your API request. -The endpoint **POST /v1/{projectName}/launch/import** allows importing a launch into the specified project using an XML or ZIP file in JUnit format. +The endpoint ```POST /v1/plugin/{projectName}/{pluginName}/import``` allows importing a launch into the specified project using an XML or ZIP file. **Permissions:** Admin, PM, Member, Customer, Operator. Here's an example of a request to the endpoint: ```yaml -curl -L -X POST 'http://localhost:8080/api/v1/superadmin_personal/launch/import' \ +curl -L -X POST 'http://localhost:8080/api/v1/plugin/superadmin_personal/junit/import' \ -H 'Content-Type: multipart/form-data' \ -H 'Authorization: Bearer {token}' \ -F 'file=@"file_path.zip";type=application/x-zip-compressed' \ @@ -77,14 +98,24 @@ curl -L -X POST 'http://localhost:8080/api/v1/superadmin_personal/launch/import' **Query parameters:** +**pluginName** – mandatory field to specify import plugin + +**projectName** – mandatory field to specify project name + +**file** – mandatory area to upload file for import + **launchImportRq** is application/json part of the request where you can specify needed custom information about launch. **attributes** – array of attributes **description** – custom launch description +**name** – custom launch name + **startTime** – if launch start time needed, or will be used first time in imported report + + If the array of attributes contains the next "skippedIsNotIssue" attribute marked as system, then all test items with SKIPPED status will be processed without applying a "To Investigate" defect type. ```yaml @@ -99,11 +130,10 @@ If the array of attributes contains the next "skippedIsNotIssue" attribute marke When set to "false", test items with SKIPPED status will be processed and marked with the defect type "To Investigate". If the parameter is not set, the default behavior is equivalent to "false". - **Scenario 1** (Test items with SKIPPED status have "To Investigate" status): ```yaml -curl -L -X POST 'http://localhost:8080/api/v1/superadmin_personal/launch/import' \ +curl -L -X POST 'http://localhost:8080/api/v1/plugin/superadmin_personal/junit/import' \ -H 'Content-Type: multipart/form-data' \ -H 'Authorization: Bearer {token}' \ -F 'file=@Launch.zip;type=application/x-zip-compressed' \ @@ -117,7 +147,7 @@ curl -L -X POST 'http://localhost:8080/api/v1/superadmin_personal/launch/import' **Scenario 2** (Test items with SKIPPED status don't have "To Investigate" status) ```yaml -curl -L -X POST 'http://localhost:8080/api/v1/superadmin_personal/launch/import' \ +curl -L -X POST 'http://localhost:8080/api/v1/plugin/superadmin_personal/junit/import' \ -H 'Content-Type: multipart/form-data' \ -H 'Authorization: Bearer {token}' \ -F 'file=@Launch.zip;type=application/x-zip-compressed' \ @@ -135,4 +165,4 @@ curl -L -X POST 'http://localhost:8080/api/v1/superadmin_personal/launch/import' }";type=application/json' ``` - + diff --git a/docs/log-data-in-reportportal/img/ImportJunitXMLReport.png b/docs/log-data-in-reportportal/img/ImportJunitXMLReport.png deleted file mode 100644 index c48272aa6..000000000 Binary files a/docs/log-data-in-reportportal/img/ImportJunitXMLReport.png and /dev/null differ diff --git a/docs/log-data-in-reportportal/img/ImportViaAPI.png b/docs/log-data-in-reportportal/img/ImportViaAPI.png new file mode 100644 index 000000000..af6ae2c99 Binary files /dev/null and b/docs/log-data-in-reportportal/img/ImportViaAPI.png differ diff --git a/docs/log-data-in-reportportal/img/parameters.png b/docs/log-data-in-reportportal/img/parameters.png new file mode 100644 index 000000000..6e1f624eb Binary files /dev/null and b/docs/log-data-in-reportportal/img/parameters.png differ diff --git a/docs/work-with-reports/OperationsUnderLaunches.mdx b/docs/work-with-reports/OperationsUnderLaunches.mdx index 632612766..291514c7d 100644 --- a/docs/work-with-reports/OperationsUnderLaunches.mdx +++ b/docs/work-with-reports/OperationsUnderLaunches.mdx @@ -200,15 +200,27 @@ To finish some launches simultaneously those are in progress now, perform the fo ## Export launches reports -The system allows exporting launches reports on the "Launches" and the "Debug" modes. You can export the launch report in the following formats: PDF, XML, HTML. +The system allows exporting launches reports on the 'Launches' and the 'Debug' modes. + +You can export the launch report in the following formats: PDF, XLS, HTML. + +Launch structure being exported: + +* launch +* suit +* test + +:::note +Nested steps and logs are not exported. +::: To export a launch, perform the following steps: -1. Navigate to the "Launches" page. -2. Select the required format from the "Export" option in the context menu on the left hand of the launch name. -3. The launch report in the selected format will be opened. +1. Go to the 'Launches' page. +2. Open the burger menu for the launch. +3. Click on the 'Export' option on the menu. - + :::note The export operation works for a separate launch only. No multiple actions for the export of launches. diff --git a/docusaurus.config.js b/docusaurus.config.js index 9afa5af91..4529fcb76 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -576,6 +576,10 @@ const config = { to: '/configuration/IntegrationViaPlugin', from: '/reportportal-configuration/IntegrationViaPlugin', }, + { + to: '/configuration/ProjectConfiguration#notifications', + from: '/configuration/ProjectConfiguration#e-mail-notifications', + }, ], }, ],