Hey everyone, I'm trying to use 2 reporters in my Playwright config file. I need HTML, and a custom reporter that sends metrics to our Grafana/Hosted Graphite dashboard that shows us which tests are failing and which are passing. I am able to run one or the other, whichever is listed first, but it will not run both and I'm not sure why.
Code is in the format of: const config: PlaywrightTestConfig = { some other code here reporter: [ ['html', './reporter-file.ts'] ], more code here },
I have tried multiple variations of reporter: [['html'], ['./reporter-file.ts']], and it's still only running the first one. If I list the reporter file first, then HTML, then we don't get an HTML report, but it does send the metrics to Hosted Graphite as expected. We need both on every run.
Any ideas would be greatly appreciated! ๐
This thread is trying to answer question "Why is only one of two reporters running in a Playwright config file?"
If:
['html'],
['./reporter-file.ts']
],
isn't working that sounds like a bug to me and might be worth raising an issue on the PW Test github repo, if it's not already an issue that's been raised! https://github.com/microsoft/playwright/issues?q=is%3Aissue+is%3Aopen
I just noticed we are on playwright/test version 1.32.3 and 1.39 is the newest. When I updated it, it broke a bunch of files and won't run our e2e tests. Once I get that working, I'll post again with the results of the multiple reporter issue in case anyone else has the same issue. I'll post a link to a bug ticket if I have to open one too.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.