### Allure Notifications: Example Mail Configuration Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md This JSON snippet provides an example configuration for the `mail` section within the `config.json` file. It demonstrates how to set up SMTP host, port, authentication credentials, security protocol, and recipient addresses (To, CC, BCC) for sending email notifications. ```JSON { "base": { ... }, "mail": { "host": "smtp.gmail.com", "port": "465", "username": "username", "password": "password", "securityProtocol": "SSL", "from": "test@gmail.com", "to": "test1@gmail.com", "cc": "testCC1@gmail.com, testCC2@gmail.com", "bcc": "testBCC1@gmail.com, testBCC2@gmail.com", "templatePath": "/templates/html_custom.ftl" } } ``` -------------------------------- ### Allure Notifications: Example Base Configuration Block Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md This JSON snippet illustrates an example configuration for the `base` block in the `config.json` file. It shows how to define project details, environment, custom comments, report links, language, Allure report folder, chart and suite publishing options, logo path, duration format, and custom data for notifications. ```JSON "base": { "project": "some project", "environment": "some env", "comment": "some comment", "reportLink": "", "language": "en", "allureFolder": "build/allure-report/", "enableChart": true, "enableSuitesPublishing": true, "logo": "logo.png", "durationFormat": "HH:mm:ss.SSS", "customData": { "variable1": "value1", "variable2": "value2" } } ``` -------------------------------- ### Discord Bot and Channel ID Setup for Allure Notifications Source: https://github.com/qa-guru/allure-notifications/blob/master/README.md Provides step-by-step instructions to create a Discord bot, obtain its `botToken`, and retrieve the `channelId` necessary for configuring Discord notifications in `config.json`. ```APIDOC Required Parameters: botToken: Token for your Discord bot. channelId: ID of the Discord channel. Steps to obtain botToken: 1. Turn on "Developer mode" in your Discord account. 2. Click on "Discord API". 3. In the Developer portal, click on "Applications". Log in again and then, back in the “Applications” menu, click on “New Application”. 4. Name the bot and then click “Create”. 5. Go to the “Bot” menu and generate a token using “Add Bot”. 6. Copy the bot’s token and paste it into the JSON config. 7. Define other details for your bot under “General Information”. 8. Click on “OAuth2”, activate “bot”, set the permissions, and then click on “Copy”. 9. Select your server to add your bot to it. Steps to obtain channelId: Right click the channel and click on "Copy ID" then paste it into the JSON config. Alternatively type the channel as a mention and place a backslash \ in front of the mention. ``` -------------------------------- ### Loop Incoming Webhook URL Setup for Allure Notifications Source: https://github.com/qa-guru/allure-notifications/blob/master/README.md Outlines the process for generating an Incoming Webhook URL within the Loop application, which is required for sending notifications. ```APIDOC Steps to create Loop webhook URL: 1. Go to main menu of Loop application. 2. Click "Integrations". 3. Choose "Incoming Webhooks". 4. Click "Add Incoming Webhook". 5. Fill out the form fields on your choice, make sure to select a channel for messages. 6. Click "Save". 7. Copy URL of webhook. ``` -------------------------------- ### Allure Notifications: Full Configuration File Structure Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md This JSON snippet outlines the complete structure of the `config.json` file required for Allure Notifications. It includes the base settings, various messenger configurations (Telegram, Slack, Mattermost, Rocket.Chat, Skype, Mail, Discord, Loop), and proxy settings, serving as a comprehensive template for project setup. ```JSON { "base": { "logo": "", "project": "", "environment": "", "comment": "", "reportLink": "", "language": "ru", "allureFolder": "", "enableChart": false, "enableSuitesPublishing": false, "customData": {} }, "telegram": { "token": "", "chat": "", "topic": "", "replyTo": "", "templatePath": "/templates/telegram.ftl" }, "slack": { "token": "", "chat": "", "replyTo": "", "templatePath": "/templates/markdown.ftl" }, "mattermost": { "url": "", "token": "", "chat": "", "templatePath": "/templates/markdown.ftl" }, "rocketChat" : { "url": "", "auth_token": "", "user_id": "", "channel": "", "templatePath": "/templates/rocket.ftl" }, "skype": { "appId": "", "appSecret": "", "serviceUrl": "", "conversationId": "", "botId": "", "botName": "", "templatePath": "/templates/markdown.ftl" }, "mail": { "host": "", "port": "", "username": "", "password": "", "securityProtocol": null, "from": "", "to": "", "cc": "", "bcc": "", "templatePath": "/templates/html.ftl" }, "discord": { "botToken": "", "channelId": "", "templatePath": "/templates/markdown.ftl" }, "loop": { "webhookUrl": "", "templatePath": "/templates/markdown.ftl" }, "proxy": { "host": "", "port": 0, "username": "", "password": "" } } ``` -------------------------------- ### Example Allure Report Summary JSON Structure Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md This JSON file, generated in the `allure-report/widgets` folder, contains general statistics about test results, including counts for failed, broken, skipped, passed, and unknown tests, as well as time-related metrics. This data is used by the Allure notifications bot to form and send automated notifications. ```JSON { "reportName" : "Allure Report", "testRuns" : [ ], "statistic" : { "failed" : 182, "broken" : 70, "skipped" : 118, "passed" : 439, "unknown" : 42, "total" : 851 }, "time" : { "start" : 1590795193703, "stop" : 1590932641296, "duration" : 11311, "minDuration" : 7901, "maxDuration" : 109870, "sumDuration" : 150125 } } ``` -------------------------------- ### Run Allure Notifications JAR with System Properties Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md This command executes the Allure Notifications JAR, passing various configuration parameters as system properties. It sets the configuration file path, base environment details like report link and project ID, and Telegram specific credentials such as bot token, chat ID, and topic ID. ```Java java "-DconfigFile=notifications/config.json" "-Dnotifications.base.environment=${STAND}" "-Dnotifications.base.reportLink=${ALLURE_SERVICE_URL}" "-Dnotifications.base.project=${PROJECT_ID}" "-Dnotifications.telegram.token=${TG_BOT_TOKEN}" "-Dnotifications.telegram.chat=${TG_CHAT_ID}" "-Dnotifications.telegram.topic=${TG_CHAT_TOPIC_ID}" -jar allure-notifications.jar ``` -------------------------------- ### Execute Allure Notifications JAR with Configuration Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md This command-line snippet demonstrates how to execute the Allure Notifications JAR file. It specifies the path to the `config.json` file using the `-DconfigFile` system property, enabling the application to read its configuration and send notifications based on Allure report data. ```Shell java "-DconfigFile=notifications/config.json" -jar notifications/allure-notifications-4.6.1.jar ``` -------------------------------- ### Allure Notifications: Base Configuration Fields Reference Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md This section provides detailed documentation for the fields available within the `base` configuration block of the `config.json` file. It describes the purpose, accepted values, and optionality for parameters such as project name, environment, report link, language, Allure folder path, chart display, suite publishing, logo, duration format, and custom data. ```APIDOC "base" Fields: - "project": string (required) Description: The name of the project. - "environment": string (required) Description: The name of the environment. - "comment": string (required) Description: A custom comment. - "reportLink": string (required) Description: The link to the Allure report with results of tests. - "language": string (required) Options: "en", "fr", "ru", "ua", "by", "cn" Description: The language in which the notification text will be formed. - "allureFolder": string (required) Description: The path to the folder with Allure results. - "enableChart": boolean (required) Options: "true", "false" Description: Whether the chart should be displayed. - "enableSuitesPublishing": boolean (required) Options: "true", "false" Default: "false" Description: Whether the statistic per suite should be published. Before enabling the option, make sure that the /widgets folder contains JSON file suites.json - "logo": string (optional) Description: Path to the logo file (if filled, the corresponding logo will be displayed in the top left corner of the chart). - "durationFormat": string (optional) Default: "HH:mm:ss.SSS" Description: Specifies the desired output format for the test duration. - "customData": object (optional) Description: Additional data that can be reused in custom Freemarker templates. ``` -------------------------------- ### Rocket.Chat Configuration Parameters for Allure Notifications Source: https://github.com/qa-guru/allure-notifications/blob/master/README.md Explains how to obtain the `url`, `auth_token`, `user_id`, and `channel` parameters required for configuring Rocket.Chat notifications. ```APIDOC Required Parameters: url: Rocket.Chat instance URL. auth_token: Authentication token. user_id: User ID. channel: Target channel. Steps to obtain parameters: 1. Generate auth_token from user setting. 2. After generation you can get auth_token and user_id. 3. You can get the channel parameter using previously generated tokens and following the Rocket.Chat API documentation. ``` -------------------------------- ### Telegram Configuration Parameters for Allure Notifications Source: https://github.com/qa-guru/allure-notifications/blob/master/README.md Details the `topic` parameter required for the `telegram` block in `config.json` for sending notifications to a specific chat topic. ```APIDOC telegram: topic: (optional) - unique chat topic identifier. Refer to Stackoverflow for guidance on obtaining this value. ``` -------------------------------- ### Allure Notifications Custom Data Property Handling Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md Explains how custom data parameters passed as system properties are processed. The `base.customData.` prefix is removed, making `variable1` accessible directly. It also notes that a `customData` parameter without a specific name is permitted. ```APIDOC Property Prefixes for Custom Data: - System property -Dbase.customData.variable1=someValue results in data with key 'variable1' and value 'someValue'. - The 'base.customData.' prefix is removed. - A 'customData' parameter without a specific name (e.g., 'base.customData.') is allowed. ``` -------------------------------- ### Telegram Messenger Configuration Parameters Source: https://github.com/qa-guru/allure-notifications/blob/master/README.en.md Details the configurable parameters for the Telegram messenger block within Allure Notifications. Currently, it describes the `topic` parameter, which is an optional identifier for message threads. ```APIDOC telegram: parameters: topic: type: string optional: true description: Unique identifier for the target message thread (topic) of the chat to send the message to. notes: Refer to Stackoverflow answers to find out how to get the parameter value. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.