modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.22k stars 289 forks source link

Using playwright reporters when testing with playwright #2410

Open ranile opened 1 year ago

ranile commented 1 year ago

I'm testing with playwrightLauncher (see config below):

// web-test-runner.config.mjs
import { playwrightLauncher } from '@web/test-runner-playwright';

/** @type import('@web/test-runner').TestRunnerConfig*/
const config = {
    browsers: [
        playwrightLauncher({ product: 'chromium' }),
        playwrightLauncher({ product: 'firefox' }),
    ],
// ...
}
export default config;

I would like to report the tests with playwright html reporter. Is there an option to do so? If not, there should be one added

Westbrook commented 1 year ago

The docs for writing your own reporter are here. You’re welcome to bring this capability into your project in that way. There are JUNIT and summary reporters in the project to use as examples.