Skip to content

[Question] how can playwright reporter be used in cucumber js #20164

@bodycombathuang

Description

@bodycombathuang

As you know, if we use playwright test framework (if I use test method like https://playwright.dev/docs/writing-tests), we can use code like following one
// playwright.config.ts
import type { PlaywrightTestConfig } from '@playwright/test';

const config: PlaywrightTestConfig = {
reporter: [
['list'],
['json', { outputFile: 'test-results.json' }]
],
};
export default config;

and run npx playwright test to generate playwright test report.

But what if I do not use playwright test method.
I want to use cucumber js framework (@cucumber/cucumber)
I write test file with code like
Given('step1', async function (this: ICustomWorld) {

});

When('step2', async function (this: ICustomWorld) {

});

Then('step3', async function (this: ICustomWorld) {

});
and run yarn cucumber-js to run test, how can playwright reporter be used in other framework like cucumber js to generate playwright-styled report?

I am in dire need of help,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions