最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

typescript - Why when I set playwright slack reporter orthoni is no more working - Stack Overflow

programmeradmin6浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 1

There 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

发布评论

评论列表(0)

  1. 暂无评论