Skip to content

Commit 5e61401

Browse files
Merge pull request #454 from testomatio/telegram-type
telegram_notification
2 parents f4628da + 1522d52 commit 5e61401

File tree

7 files changed

+127
-47
lines changed

7 files changed

+127
-47
lines changed

astro.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ export default defineConfig({
351351
{ label: 'Email', link: '/integrations/report-notifications/email' },
352352
{ label: 'Slack', link: '/integrations/report-notifications/slack' },
353353
{ label: 'Microsoft Teams', link: '/integrations/report-notifications/ms-teams' },
354+
{ label: 'Telegram', link: '/integrations/report-notifications/telegram' },
354355
{ label: 'Jira', link: '/integrations/report-notifications/jira' },
355356
{label: 'Azure DevOps', link: '/integrations/report-notifications/azure-devops'},
356357
],
132 KB
Loading
162 KB
Loading
396 KB
Loading

src/content/docs/integrations/report-notifications/rules.md

Lines changed: 49 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,26 @@ head:
88
attrs:
99
name: og:image
1010
content: https://docs.testomat.io/_astro/Basic_Rules.BGM4UhZJ_Z1Yiri8.webp
11-
11+
1212
- tag: meta
1313
attrs:
1414
name: keywords
15-
content: Testomat.io, notifications, Email alerts, Email notifications, Slack notifications, MS Teams, Jira integration, Jira Notification, Azure DevOps, notification rules, test runs, automated alerts, CI notifications, QA tools, notification channels, Report Notification, Basic rules, Advanced rules engine, Run Group Notifications, test management, test automation, software testing
15+
content: Testomat.io, notifications, Email alerts, Email notifications, Slack notifications, MS Teams, Jira integration, Jira Notification, Azure DevOps, Telegram notification, Notification rules, test runs, automated alerts, CI notifications, QA tools, notification channels, Report Notification, Basic rules, Advanced rules engine, Run Group Notifications, test management, test automation, software testing
1616
---
1717

1818
**Notification** is one of the attractive Agile testing tool features. Test management web application Testomat.io provides for collaborative purposes notification QA team, development team and business. So, keeping the teams engaged with project updates and getting fast feedback from business owners is simpler than ever! In addition, you as the test manager or team owner through **Team Management Dashboard** will have end-to-end visibility on your collaboration process.
1919

2020
**Available to notify by:**
21-
- Email notifications.
22-
- Slack notification.
23-
- Jira Notification.
24-
- MS Teams.
25-
- Azure DevOps.
21+
22+
- **Email** notifications.
23+
- **Slack** notification.
24+
- **Microsoft Teams** notification.
25+
- **Jira** notification.
26+
- **Azure DevOps** notification.
27+
- **Telegram** notification.
2628

2729
Testomat.io allows sending notifications for finished runs:
30+
2831
- Send brief reports to stakeholders.
2932
- Notify team members of failed or passed tests.
3033
- Notify test results after test executions.
@@ -69,20 +72,20 @@ manual and contains(run, "Release")
6972

7073
A complete list of allowed variables:
7174

72-
* `automated` - boolean. True if a run is automated
73-
* `manual` - boolean. True if a run is manual
74-
* `has_failed` - boolean. True if a run has failed
75-
* `has_passed` - boolean. True if a run has passed
76-
* `was_terminated` - boolean. True if a run was terminated
77-
* `run` - string. Title of a run
78-
* `rungroup` - title. Title of rungroup a run belongs to
79-
* `status` - string. Status of run, 'passed' or 'failed' as a string.
80-
* `started_at` - datetime. Time when the run was started.
81-
* `finished_at` - datetime. Time when the run was finished
82-
* `passed_tests` - collection. A list of all passed tests in a run.
83-
* `failed_tests` - collection. A list of all failed tests in a run.
84-
* `skipped_tests` - collection. A list of all skipped tests in a run.
85-
* `env` - collection. A list of environments.
75+
- `automated` - boolean. True if a run is automated
76+
- `manual` - boolean. True if a run is manual
77+
- `has_failed` - boolean. True if a run has failed
78+
- `has_passed` - boolean. True if a run has passed
79+
- `was_terminated` - boolean. True if a run was terminated
80+
- `run` - string. Title of a run
81+
- `rungroup` - title. Title of rungroup a run belongs to
82+
- `status` - string. Status of run, 'passed' or 'failed' as a string.
83+
- `started_at` - datetime. Time when the run was started.
84+
- `finished_at` - datetime. Time when the run was finished
85+
- `passed_tests` - collection. A list of all passed tests in a run.
86+
- `failed_tests` - collection. A list of all failed tests in a run.
87+
- `skipped_tests` - collection. A list of all skipped tests in a run.
88+
- `env` - collection. A list of environments.
8689

8790
An expression should return a boolean value. To deal with types other than boolean functions and methods can be used:
8891

@@ -96,20 +99,21 @@ contains(run, "New")
9699

97100
**Collection**
98101

99-
Collections contain an array of objects.
102+
Collections contain an array of objects.
100103

101104
Use `.size` to check for the size of items in the collection. For instance, this rule is activated when a number of failed tests is more than 10.
102105

103106
```
104107
failed_tests.size > 10
105108
```
109+
106110
Collection of tests can be filtered. Tests in the collection have following properties:
107111

108-
* `test['title']` - title of a test
109-
* `test['suite']` - title of a suite of a test
110-
* `test['id']` - id of a test
111-
* `test['suite_id']` - id of a suite
112-
* `test['status']` - status of a test in collection
112+
- `test['title']` - title of a test
113+
- `test['suite']` - title of a suite of a test
114+
- `test['id']` - id of a test
115+
- `test['suite_id']` - id of a suite
116+
- `test['status']` - status of a test in collection
113117

114118
For instance, this is how to check if a collection of failed tests contains at least one test with `@important` tag in its name:
115119

@@ -121,13 +125,13 @@ failed_tests.filter(test, contains(test["title"], "@important")).size > 0
121125

122126
`started_at` and `finished_at` variables are of datetime type. They have properties from [Date](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html) and [DateTime](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/DateTime.html) classes of Ruby that can be used in expressions. Most used ones are:
123127

124-
* `hour`
125-
* `minute`
126-
* `day`
127-
* `wday`
128-
* `month`
129-
* `year`
130-
* [etc](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html)
128+
- `hour`
129+
- `minute`
130+
- `day`
131+
- `wday`
132+
- `month`
133+
- `year`
134+
- [etc](https://ruby-doc.org/stdlib-2.6.1/libdoc/date/rdoc/Date.html)
131135

132136
For instance, this is how notification can be enabled for reports finished in non-business time:
133137

@@ -177,7 +181,7 @@ automated and has_failed and contains (env, "alpha”)
177181
has_passed and passed_tests.filter(test, contains(test["title"], "autocomplete")).size > 0
178182
```
179183

180-
For example:
184+
For example:
181185

182186
![Testomat.io - Run Rules](./images/Run_rule.png)
183187

@@ -206,12 +210,12 @@ The rules engine allows writing conditions in a special expression language simi
206210

207211
A list of allowed variables:
208212

209-
* `title` - string. Title of a rungroup
210-
* `rungroup_finished` - boolean. True if all runs completed => True if rungroup contains only finished runs.
211-
* `runs` - collection. A list of all runs inside a rungroup
212-
* `finished_runs` - collection. A list of finished (passed or failed) runs inside a rungroup
213-
* `ongoing_runs` - collection. A list of pending runs (scheduled, in progress) runs inside a rungroup
214-
* `failed_runs` - collection. A list of failed runs inside a rungroup
213+
- `title` - string. Title of a rungroup
214+
- `rungroup_finished` - boolean. True if all runs completed => True if rungroup contains only finished runs.
215+
- `runs` - collection. A list of all runs inside a rungroup
216+
- `finished_runs` - collection. A list of finished (passed or failed) runs inside a rungroup
217+
- `ongoing_runs` - collection. A list of pending runs (scheduled, in progress) runs inside a rungroup
218+
- `failed_runs` - collection. A list of failed runs inside a rungroup
215219

216220
### Examples for Run Groups Notifications
217221

@@ -234,14 +238,16 @@ ongoing_runs.filter(run, run['created_at'] <= 0.seconds_ago).size == 0
234238
```
235239

236240
**Notify when next rules are met:**
237-
- the title of the Run Group contains the substring 'str-' and
241+
242+
- the title of the Run Group contains the substring 'str-' and
238243
- all runs within this Run Group are finished and
239244
- at least one of the runs within this Run Group has a title that contains the exact string 'islast: true'
240245

241246
```
242247
contains(title, "str-") and rungroup_finished and (runs.select(run, contains(run["title"], "islast: true")).size > 0)
243248
```
244-
For example:
249+
250+
For example:
245251

246252
![Testomat.io - RunGroup Rules](./images/RunGroup_rule.png)
247253

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
title: Telegram Notifications
3+
description: Configure Telegram notifications in Testomat.io to receive test updates. This guide provides detailed steps for creating a Telegram bot, generating a Bot Token, retrieving a Chat ID, and linking it with Testomat.io for seamless test result notifications.
4+
type: article
5+
url: https://docs.testomat.io/integrations/report-notifications/telegram
6+
head:
7+
- tag: meta
8+
attrs:
9+
name: keywords
10+
content: Telegram integration, Testomat.io, failed test runs, Notification rules, Report Notifications, Add Notification Rule, publish report, public link, basic rules, advanced rules engine, detailed test run results, test management, test automation, software testing
11+
---
12+
13+
Testomat.io provides integration with **Telegram** to deliver real-time notifications about your test results directly into your chat. This integration allows you to keep the entire team updated about failed test runs, published reports, or other key QA events without leaving Telegram.
14+
15+
Before creating a **New Notification Rule** in Testomat.io, you need to have:
16+
17+
- **Telegram bot token** — if you don’t have one yet, follow the official Telegram instructions to [create a new bot](https://core.telegram.org/bots#creating-a-new-bot).
18+
19+
## How to get a Chat/Channel/Group ID
20+
21+
To send notifications from Testomat.io to Telegram, you need a unique identifier (ID) for the destination:
22+
23+
- **Chat ID** is used for sending notifications to a personal/individual chat
24+
- **Channel/Group ID** is used for sending notifications to a shared channel or group
25+
26+
### Individual Chat Notifications
27+
28+
1. Open a chat with your bot in Telegram
29+
2. Send any message to the bot
30+
3. Forward this message to [@username_to_id_bot](https://t.me/username_to_id_bot) to get the **Chat ID**
31+
4. Paste the returned ID into the **Telegram bot chat/channel/group ID** field in Testomat.io
32+
33+
### Channel/Group Notifications
34+
35+
1. Create a channel (or group) in Telegram
36+
2. Add your bot as an **administrator**
37+
3. In the channel/group, send any message
38+
4. Forward this message to [@username_to_id_bot](https://t.me/username_to_id_bot) to get the **Channel/Group ID**
39+
5. Paste the returned ID into the **Telegram bot chat/channel/group ID** field in Testomat.io
40+
41+
## How to Create a New Notification Rule for Telegram
42+
43+
1. Navigate to **Settings** in the left sidebar
44+
2. Open the **Report notifications** page
45+
3. Click on the **Add Notification Rule** button
46+
47+
![Add Notification Rule](./images/att1_telegram.png)
48+
49+
Once the page opens, fill in the following fields:
50+
51+
4. **Title** — Notification rule name (required)
52+
5. **Notification Type** — select **Telegram** from the dropdown (required)
53+
6. **Telegram bot token** (required)
54+
7. **Telegram bot chat/channel/group ID** (required)
55+
56+
:::note
57+
58+
Add the bot as an **administrator** of the channel/group. Without admin rights, Testomat.io cannot deliver notifications, even with the correct Channel/Group ID.
59+
60+
:::
61+
62+
8. Enable **Publish a report and use public link in report notification** (optional)
63+
9. Configure Rules: choose [Basic Rules](https://docs.testomat.io/integrations/report-notifications/rules/#basic-rules) or [Advanced Rules Engine](https://docs.testomat.io/integrations/report-notifications/rules/#advanced-rules)
64+
10. Click **Save** button to create the new Notification Rule
65+
66+
![Save new notification rule](./images/att2_telegram.png)
67+
68+
After saving your rule:
69+
70+
- Use the **Test webhook** button to send a sample notification and confirm that everything is working correctly
71+
- Run a test in Testomat.io and check that a notification with test results appears in your Telegram chat/channel/group
72+
73+
![Telegram notification](./images/att3_telegram.png)

src/content/docs/management/project/templates.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Templates in Testomat.io empower teams to work faster and more consistently by s
1515
:::note
1616

1717
To ensure newly created **Notification Templates** are applied correctly, you must also create a new **Notification Rule**.
18-
Without it, Slack or Microsoft Teams notifications will continue using the default message format with all supported variables.
18+
Without it, Slack, Telegram or Microsoft Teams notifications will continue using the default message format with all supported variables.
1919

2020
Learn more: [How to create a Notification Rule](https://docs.testomat.io/integrations/report-notifications/rules/)
2121

@@ -28,7 +28,7 @@ Learn more: [How to create a Notification Rule](https://docs.testomat.io/integra
2828
- **Code Template**: used to define the default code structure for automated tests with dynamic variables to simplify test automation;
2929
- **Defect Template**: used to automatically prefill the issue summary and description fields when reporting defects to integrations like Jira, GitHub, or Azure;
3030
- **Meta Template**: defines which meta-data keys are displayed in the Run Report View; it controls how data is shown and helps enrich report context;
31-
- **Notification Template (Slack / MS Teams)**: used to customize the structure and content of automated messages sent to Slack or Microsoft Teams after a test run is completed;
31+
- **Notification Template (Slack / MS Teams / Telegram)**: used to customize the structure and content of automated messages sent to Slack, Microsoft Teams, or Telegram after a test run is completed;
3232

3333
:::note
3434

@@ -55,7 +55,7 @@ Once the **Add template** sidebar opens,
5555
4. Fill in the following fields:
5656

5757
- **Title** (required): enter a unique title and optionally add tags using @ syntax (e.g., @smoke);
58-
- **Type** (required): select the template type from the dropdown — **test** is selected by default, but you can change it to suite, defect, code, meta, notification-slack, or notification-ms-teams;
58+
- **Type** (required): select the template type from the dropdown — **test** is selected by default, but you can change it to suite, defect, code, meta, notification-slack, notification-telegram, or notification-ms-teams;
5959
- **Default** (optional): set this template as the default by clicking the **star icon**;
6060

6161
:::note
@@ -527,7 +527,7 @@ In the Run Report View, the values corresponding to the keys defined in the temp
527527

528528
Unlike other template types, **there is no manual option to select a Notification Template** during a test run or when sending report notifications.
529529

530-
Once you have configured Slack or Microsoft Teams integration via the [Slack Notification](https://docs.testomat.io/integrations/report-notifications/slack/) or [MS Teams Notification](https://docs.testomat.io/integrations/report-notifications/ms-teams/), and created a **default** Notification Template, it will be automatically applied to all notifications triggered by your configured Notification Rules.
530+
Once you have configured [Slack Notification](https://docs.testomat.io/integrations/report-notifications/slack/), [MS Teams Notification](https://docs.testomat.io/integrations/report-notifications/ms-teams/), or [Telegram Notification](https://docs.testomat.io/integrations/report-notifications/telegram), and created a default Notification Template, it will be automatically applied to all notifications triggered by your configured Notification Rules.
531531

532532
![Notification Template](./images/att18_6270.png)
533533

0 commit comments

Comments
 (0)