You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scripts/integrations/slack/README.md
+27-5Lines changed: 27 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,27 @@ The Slack integration is designed to notify outcome teams of post-deployment tes
9
9
***Modularity** The notification script is designed as a reusable component, allowing for easy updates to message formats without modifying the core pipeline logic.
10
10
***Error Handling** The scripts handle basic scenarios such as lack of required parameters like the webhook URL, or if test result parsing fails.
11
11
12
+
## Message Styles for Test Results
13
+
14
+
This integration script generates the following style of notification messages:
15
+
16
+
**Full Pass Rate**
17
+
All tests have passed based on test results.
18
+
19
+

20
+
21
+
22
+
**Partial Pass Rate**
23
+
_Some_ tests failed or raised warnings. Please click the build link to navigate to the build details.
24
+
25
+

26
+
27
+
28
+
29
+
**Failure**
30
+
_All_ tests failed or raised warnings. Please click the build link to navigate to the build details.
31
+
32
+

12
33
13
34
## Set Up the Slack App
14
35
@@ -44,19 +65,19 @@ settings:
44
65
org_deploy_enabled: false
45
66
socket_mode_enabled: false
46
67
token_rotation_enabled: false
47
-
48
68
```
69
+
49
70
5. In the _Review summary & create your app_, click **Create**.
50
71
5. You will now be navigated to the application configuration.
51
-

72
+

52
73
5. Record all the entires for `App ID`, `Client ID`, `Client Secret`, `Signing Secret`, `Verification Token` etc.
53
74
5. Navigate to **Incoming Webhooks** and enable the toggle **Activate Incoming Webhooks**.
54
-

75
+

55
76
5. Scroll down the page to create a webhook endpoint.
56
77
5. Click on **Add new webhook**
57
78
5. In the next screen, Slack requires permission to generate a webhook inside a selected channel. So, select the appropriate channel you wish the app to post notifications to and click **Allow**.
58
79
5. You'll now see the generated URL for the application to post to the specified channel
59
-

80
+

60
81
5. Copy this webhook URL. This URL will be used by the Azure Pipelines and Python script.
61
82
62
83
@@ -65,6 +86,7 @@ settings:
65
86
## Azure Pipelines
66
87
67
88
### General Flow
89
+
68
90
```
69
91
START
70
92
|
@@ -111,11 +133,11 @@ The parent pipeline triggers the child pipeline and passes parameters, such as t
111
133
testfileDirectory: 'src/tests/e2e/testFiles'
112
134
slackWebHook: $(SLACK_WEBHOOK_URL)
113
135
```
136
+
114
137
| Parameter | Meaning | Source |
115
138
|-|-|-|
116
139
| SLACK_WEBHOOK_URL | This is a unique URL provided by Slack for an installed Slack App's Webhook. | Specified either in the Azure Pipeline's Variable Groups, or set as an environment variable. _Recommend to store this value in the pipeline variable groups._
117
140
118
-
119
141
### Child Pipeline
120
142
121
143
The child pipeline runs all Playwright tests and publishes the results as an artifact linked to the build. If then generate **JUnit** XML results (`results.xml`) and triggers the Python script with all relevant parameters.
0 commit comments