Rayrun
โ† Back to Discord Forum

Multiple reporters only running 1 of the 2 listed

cod3r_54237posted in #help-playwright
Open in Discord

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?"

7 replies

Based on silly mistakes I've made myself is ./reporter-file.ts definitely the right path relative to the config file?

Scratch that, my mistake for commenting before finishing reading your message ๐Ÿคฆโ€โ™‚๏ธ

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

@testdouble: Thanks! I was wondering if that may be the case or if it was something silly on my end. Thank you for taking a look!

Thanks! I was wondering if that may be the case or if it was something silly on my end. Thank you for taking a look!

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.

Nice one, always great to see other people caring about contributing ๐Ÿ™‚

@cod3r_54237 Can you guide me how to configure Grafana/Hosted Graphite dashboard

@cod3r_54237 Yep, would appreciate for some help in implementing the custom reporter to grafana

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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.