I have a playwright project. I integrated Orthoni report into it.
Now I am trying to integrate playwright-slack-report([github doc -> option B]) so i added this to the playwright.config.ts
export default defineConfig({
.....
reporter: [
["ortoni-report", reportConfig],
['json', { outputFile: 'result.json' }],
['playwright-slack-report', {
channels: ['my_channel_name'],
slackToken: 'xoxb-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
sendResults: 'always', // Options: 'always', 'on-failure'
includeScreenshots: true,
includeTestSteps: true,
}]
.....
});
after I run the test , I am not getting the notification, knowing that i tested the API of slack using postman and it works. What I did for this problem is I added
['json', { outputFile: 'result.json' }],
because i was not able to run the script after adding playwright-slack-report The question what should i do more so those reports work correctly
here more details about the versions
"devDependencies": {
"@playwright/test": "^1.50.1",
"@types/node": "^22.13.8",
"ortoni-report": "^2.0.9",
"playwright-slack-report": "^1.1.89"
},
I have a playwright project. I integrated Orthoni report into it.
Now I am trying to integrate playwright-slack-report([github doc -> option B]) so i added this to the playwright.config.ts
export default defineConfig({
.....
reporter: [
["ortoni-report", reportConfig],
['json', { outputFile: 'result.json' }],
['playwright-slack-report', {
channels: ['my_channel_name'],
slackToken: 'xoxb-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
sendResults: 'always', // Options: 'always', 'on-failure'
includeScreenshots: true,
includeTestSteps: true,
}]
.....
});
after I run the test , I am not getting the notification, knowing that i tested the API of slack using postman and it works. What I did for this problem is I added
['json', { outputFile: 'result.json' }],
because i was not able to run the script after adding playwright-slack-report The question what should i do more so those reports work correctly
here more details about the versions
"devDependencies": {
"@playwright/test": "^1.50.1",
"@types/node": "^22.13.8",
"ortoni-report": "^2.0.9",
"playwright-slack-report": "^1.1.89"
},
Share
Improve this question
edited Mar 24 at 23:52
I.sh.
2,1712 gold badges12 silver badges44 bronze badges
asked Mar 24 at 12:59
Zain ElabidineZain Elabidine
3595 silver badges16 bronze badges
1 Answer
Reset to default 1There might be a Typo in the reporter config with slackOAuthToken
as shown in the official documentation.
slackOAuthToken: 'xoxb-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
Instead,
slackToken: 'xoxb-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
reference: See Configuration section for both Option A and B @ https://www.npmjs/package/playwright-slack-report