playwright-slack-report 1.1.54 → 1.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +95 -4
- package/dist/cli.js +27 -2
- package/dist/src/ResultsParser.js +1 -1
- package/dist/src/ResultsParser.js.map +1 -1
- package/dist/src/index.d.ts +5 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# playwright-slack-report  [](https://github.com/ryanrosello-og/playwright-slack-report/blob/master/LICENSE) [](https://coveralls.io/github/ryanrosello-og/playwright-slack-report?branch=main)
|
|
2
|
+
[code quatlity badge][](https://github.com/ryanrosello-og/playwright-slack-report/actions/workflows/github-code-scanning/codeql)
|
|
2
3
|
|
|
3
4
|
[](https://gitpod.io/#https://github.com/ryanrosello-og/playwright-slack-report)
|
|
4
5
|
|
|
@@ -153,23 +154,113 @@ Next, you will need to configure the cli. See example below:
|
|
|
153
154
|
"maxNumberOfFailures": 4,
|
|
154
155
|
"disableUnfurl": true
|
|
155
156
|
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The config file also supports the follow extra options:
|
|
160
|
+
* `proxy` - String representation of your proxy server.
|
|
161
|
+
* `sendUsingWebhook` - Object containing the webhook url to send the results to
|
|
156
162
|
|
|
157
|
-
The config file also supports the follow extra options for using a proxy and sending results via a webhook:
|
|
158
163
|
|
|
159
164
|
|
|
160
165
|
```json
|
|
161
|
-
|
|
166
|
+
{
|
|
167
|
+
"sendResults": "always",
|
|
168
|
+
"slackLogLevel": "error",
|
|
162
169
|
"proxy": "http://proxy.mycompany.com:8080",
|
|
163
170
|
"sendUsingWebhook": {
|
|
164
171
|
"webhookUrl": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
|
|
165
172
|
},
|
|
166
|
-
|
|
173
|
+
"showInThread": true,
|
|
174
|
+
"meta": [
|
|
175
|
+
{ "key": "build", "value" : "1.0.0"},
|
|
176
|
+
{ "key": "branch", "value" : "master"},
|
|
177
|
+
{ "key": "commit", "value" : "1234567890"},
|
|
178
|
+
{ "key": "results", "value" : "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"}
|
|
179
|
+
],
|
|
180
|
+
"maxNumberOfFailures": 4,
|
|
181
|
+
"disableUnfurl": true
|
|
182
|
+
}
|
|
167
183
|
```
|
|
168
184
|
|
|
169
185
|
Once you have generated the JSON report and defined your config file, you can send it to Slack using the following command:
|
|
170
186
|
|
|
171
|
-
`SLACK_BOT_USER_OAUTH_TOKEN=[your Slack bot user OAUTH token] npx playwright-slack-report -c cli_config.json -j
|
|
187
|
+
`SLACK_BOT_USER_OAUTH_TOKEN=[your Slack bot user OAUTH token] npx playwright-slack-report -c cli_config.json -j > merged_tests_results.json`
|
|
188
|
+
|
|
189
|
+
Both the `-c` and `-j` options are required. The `-c` option is the path to your config file and the `-j` option is the path to your merged JSON report. You will also need to pipe the output to a json file, using the `>` operator.
|
|
190
|
+
|
|
191
|
+
### Additional notes
|
|
192
|
+
* The CLI currently does not support custom layouts 👎🥺
|
|
193
|
+
* The config file for the cli app is stand-alone, which means you no longer need to define the Playwright slack reporter in your `playwright.config.ts` file
|
|
194
|
+
* In order to handle dynamic meta data e.g. environment variables storing your build id, branch name etc, you can use the `meta` option in the config file and use the format: `{__ENV_VARIABLE_NAME}` as its value. This will be replaced with the actual value of the environment variable at runtime. See example below:
|
|
195
|
+
|
|
196
|
+
In your `cli_config.json` file:
|
|
197
|
+
|
|
198
|
+
`__ENV_BUILD_ID` is equivalent to `process.env.BUILD_ID`. This will be automatically handled for you.
|
|
199
|
+
|
|
200
|
+
You will encounter the following error if the environment variable is not defined:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
❌ Environment variable [blah] was not set.
|
|
204
|
+
This variable was found in the [meta] section of the config file, ensure the variable is set in your environment.
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Sample Github Actions workflow
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
```yaml
|
|
211
|
+
...
|
|
212
|
+
|
|
213
|
+
merge-reports:
|
|
214
|
+
# Merge reports after playwright-tests, even if some shards have failed
|
|
215
|
+
if: always()
|
|
216
|
+
needs: [playwright-tests]
|
|
217
|
+
|
|
218
|
+
runs-on: ubuntu-latest
|
|
219
|
+
steps:
|
|
220
|
+
- uses: actions/checkout@v3
|
|
221
|
+
- uses: actions/setup-node@v3
|
|
222
|
+
with:
|
|
223
|
+
node-version: 18
|
|
224
|
+
- name: Install dependencies
|
|
225
|
+
run: npm ci
|
|
226
|
+
|
|
227
|
+
- name: Download blob reports from GitHub Actions Artifacts
|
|
228
|
+
uses: actions/download-artifact@v3
|
|
229
|
+
with:
|
|
230
|
+
name: all-blob-reports
|
|
231
|
+
path: all-blob-reports
|
|
232
|
+
|
|
233
|
+
- name: Merge into JSON Report
|
|
234
|
+
run: npx playwright merge-reports --reporter json ./all-blob-reports > merged_tests_results.json
|
|
235
|
+
|
|
236
|
+
- name: View merged results
|
|
237
|
+
run: cat ${GITHUB_WORKSPACE}/merged_tests_results.json
|
|
238
|
+
|
|
239
|
+
- name: Send report to Slack using CLI
|
|
240
|
+
env:
|
|
241
|
+
SLACK_BOT_USER_OAUTH_TOKEN: ${{ secrets.SLACK_BOT_USER_OAUTH_TOKEN }}
|
|
242
|
+
run: npx playwright-slack-report --config="${GITHUB_WORKSPACE}/cli_config.json" --json-results="${GITHUB_WORKSPACE}/merged_tests_results.json"
|
|
243
|
+
...
|
|
244
|
+
```
|
|
172
245
|
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"sendResults": "always",
|
|
249
|
+
"slackLogLevel": "error",
|
|
250
|
+
"sendUsingBot": {
|
|
251
|
+
"channels": ["demo"]
|
|
252
|
+
},
|
|
253
|
+
"showInThread": true,
|
|
254
|
+
"meta": [
|
|
255
|
+
{ "key": "build", "value" : "{__ENV_BUILD_ID}"},
|
|
256
|
+
{ "key": "branch", "value" : "{__ENV_BRANCH_NAME}"},
|
|
257
|
+
{ "key": "commit", "value" : "{__ENV_COMMIT_ID}"},
|
|
258
|
+
{ "key": "results", "value" : "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"}
|
|
259
|
+
],
|
|
260
|
+
"maxNumberOfFailures": 4,
|
|
261
|
+
"disableUnfurl": true
|
|
262
|
+
}
|
|
263
|
+
```
|
|
173
264
|
|
|
174
265
|
# ⚙️ Configuration
|
|
175
266
|
|
package/dist/cli.js
CHANGED
|
@@ -54,12 +54,15 @@ program
|
|
|
54
54
|
agent,
|
|
55
55
|
});
|
|
56
56
|
const slackWebhookClient = new SlackWebhookClient_1.default(webhook);
|
|
57
|
+
let summaryResults = resultSummary;
|
|
58
|
+
const meta = replaceEnvVars(config.meta);
|
|
59
|
+
summaryResults = { ...resultSummary, meta };
|
|
57
60
|
const webhookResult = await slackWebhookClient.sendMessage({
|
|
58
61
|
customLayout: undefined,
|
|
59
62
|
customLayoutAsync: undefined,
|
|
60
63
|
maxNumberOfFailures: config.maxNumberOfFailures,
|
|
61
64
|
disableUnfurl: config.disableUnfurl,
|
|
62
|
-
summaryResults
|
|
65
|
+
summaryResults,
|
|
63
66
|
});
|
|
64
67
|
// eslint-disable-next-line no-console
|
|
65
68
|
console.log(JSON.stringify(webhookResult, null, 2));
|
|
@@ -78,7 +81,8 @@ async function sendResultsUsingBot({ resultSummary, slackClient, config, }) {
|
|
|
78
81
|
return true;
|
|
79
82
|
}
|
|
80
83
|
let summaryResults = resultSummary;
|
|
81
|
-
|
|
84
|
+
const meta = replaceEnvVars(config.meta);
|
|
85
|
+
summaryResults = { ...resultSummary, meta };
|
|
82
86
|
if (config.sendUsingBot) {
|
|
83
87
|
const result = await slackClient.sendMessage({
|
|
84
88
|
options: {
|
|
@@ -110,4 +114,25 @@ async function sendResultsUsingBot({ resultSummary, slackClient, config, }) {
|
|
|
110
114
|
}
|
|
111
115
|
throw new Error('sendUsingBot config is not set');
|
|
112
116
|
}
|
|
117
|
+
function replaceEnvVars(originalMeta) {
|
|
118
|
+
const newMeta = [];
|
|
119
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
120
|
+
for (const m of originalMeta) {
|
|
121
|
+
let metaValue = m.value;
|
|
122
|
+
if (m.value.startsWith('__ENV')) {
|
|
123
|
+
const environmentVarName = m.value.replace('__ENV_', '');
|
|
124
|
+
if (process.env[environmentVarName]) {
|
|
125
|
+
metaValue = process.env[environmentVarName];
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
const warningMessage = `❌ Environment variable [${environmentVarName}] was not set.
|
|
129
|
+
This variable was found in the [meta] section of the config file, ensure the variable is set in your environment.`;
|
|
130
|
+
console.log(warningMessage);
|
|
131
|
+
metaValue = warningMessage;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
newMeta.push({ key: m.key, value: metaValue });
|
|
135
|
+
}
|
|
136
|
+
return newMeta;
|
|
137
|
+
}
|
|
113
138
|
//# sourceMappingURL=cli.js.map
|
|
@@ -38,7 +38,7 @@ class ResultsParser {
|
|
|
38
38
|
async parseFromJsonFile(filePath) {
|
|
39
39
|
const data = fs.readFileSync(filePath, 'utf-8');
|
|
40
40
|
const parsedData = JSON.parse(data);
|
|
41
|
-
const
|
|
41
|
+
const retries = parsedData.config.projects[0]?.retries || 0;
|
|
42
42
|
await this.parseTestSuite(parsedData.suites, retries);
|
|
43
43
|
const failures = await this.getFailures();
|
|
44
44
|
const summary = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultsParser.js","sourceRoot":"","sources":["../../src/ResultsParser.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,yCAAyC;AACzC,sCAAsC;AACtC,qCAAqC;AACrC,2CAA2C;AAC3C,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;AAEtC,uCAAyB;AAkCzB,MAAqB,aAAa;IACxB,MAAM,CAAc;IAE5B;QACE,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;IACn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EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,WAAW,CACjD,CAAC;QACF,IAAI,cAAc,EAAE;YAClB,OAAO;gBACL,WAAW,EAAE,cAAc,CAAC,WAAW;gBACvC,OAAO,EAAE,cAAc,CAAC,OAAO;aAChC,CAAC;SACH;QACD,OAAO;YACL,WAAW,EAAE,EAAE;YACf,OAAO,EAAE,EAAE;SACZ,CAAC;IACJ,CAAC;CACF;AA1SD,gCA0SC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,10 +5,7 @@ export type SummaryResults = {
|
|
|
5
5
|
flaky: number | undefined;
|
|
6
6
|
skipped: number;
|
|
7
7
|
failures: Array<failure>;
|
|
8
|
-
meta?:
|
|
9
|
-
key: string;
|
|
10
|
-
value: string;
|
|
11
|
-
}>;
|
|
8
|
+
meta?: Meta;
|
|
12
9
|
tests: Array<{
|
|
13
10
|
suiteName: string;
|
|
14
11
|
name: string;
|
|
@@ -27,6 +24,10 @@ export type SummaryResults = {
|
|
|
27
24
|
}[];
|
|
28
25
|
}>;
|
|
29
26
|
};
|
|
27
|
+
export type Meta = Array<{
|
|
28
|
+
key: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}>;
|
|
30
31
|
export type failure = {
|
|
31
32
|
test: string;
|
|
32
33
|
failureReason: string;
|
package/package.json
CHANGED
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"lint": "npx eslint . --ext .ts",
|
|
33
33
|
"lint-fix": "npx eslint . --ext .ts --fix",
|
|
34
34
|
"cli": "yarn build && node dist/cli.js",
|
|
35
|
-
"cli-debug": "yarn build && npx . -c ./
|
|
35
|
+
"cli-debug": "yarn build && npx . -c ./cli_config.json -j ./tests/test_data/valid_test_results.json"
|
|
36
36
|
},
|
|
37
37
|
"name": "playwright-slack-report",
|
|
38
|
-
"version": "1.1.
|
|
38
|
+
"version": "1.1.56",
|
|
39
39
|
"bin": {
|
|
40
40
|
"playwright-slack-report": "dist/cli.js"
|
|
41
41
|
},
|