microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
63.9k stars 3.46k forks source link

[Feature] BDD implementation with Playwright test runner #11975

Open ShanmukhaGajula opened 2 years ago

ShanmukhaGajula commented 2 years ago

Our team has a case to use the BDD test, Playwright has any plan to add their own BDD implementation using the playwright test runner? That would be great if to have.

This can help many people who want to use BDD along with Playwright. That's where cucumber became popular 😉

unlikelyzero commented 2 years ago

@1996phani would https://codecept.io/playwright/ serve your needs?

saranyakakarlapudi commented 2 years ago

BDD implementation with Playwright test runner is what am also looking for..

keshavmunagala commented 2 years ago

It would be great to have BDD with Playwright

ShanmukhaGajula commented 2 years ago

@1996phani would https://codecept.io/playwright/ serve your needs?

@unlikelyzero, The package you're mentioning has been deprecated.

I am looking for something kind of Native support from the Playwright

pavelfeldman commented 2 years ago

Let's collect upvotes. Please upvote the OP!

CodeStrikerr commented 2 years ago

Yeah BBD is a must thing!

soundaryakk commented 2 years ago

It would be helpful ,if we have BDD along with Playwright.

kvsrk432 commented 2 years ago

BDD support is a perk

siddharththakurji commented 2 years ago

bdd is a good feature to have.. i am using in selenium java.. i need it in playwright to migrate

Vinaymanchala commented 2 years ago

I'm looking for bdd too!

Geetha2604 commented 2 years ago

Good to have BDD with playwright

dimmetasowjanya commented 2 years ago

Having BDD with Playwright will be helpful

unlikelyzero commented 2 years ago

@1996phani would https://codecept.io/playwright/ serve your needs?

@unlikelyzero, The package you're mentioning has been deprecated.

I am looking for something kind of Native support from the Playwright

@ShanmukhaGajula where does it say that?

ShanmukhaGajula commented 2 years ago

@1996phani would https://codecept.io/playwright/ serve your needs?

@unlikelyzero, The package you're mentioning has been deprecated. I am looking for something kind of Native support from the Playwright

@ShanmukhaGajula where does it say that?

I see a pop-up yesterday when I opened that link. I think they've removed now. However, I see playwright test runner and reporting is very good and hence requesting Playwright team for that feature within playwright itself.

abhirammocharla commented 2 years ago

BDD is always good to have

PranayEtikala commented 2 years ago

Yes, Looking for BDD to implement playwright in our project.

Akhila4062 commented 2 years ago

BDD is a must-have feature for us too! It really helps.

Mohan2736 commented 2 years ago

Hope playwright will add this BDD feature..

agarwalu commented 2 years ago

i was also looking for same.. BDD will really add value

marko-simic commented 2 years ago

I'm looking for BDD too!

IsabelFrancis commented 2 years ago

Looking forward to have BDD feature with Playwright,

KalyanPuppala36 commented 2 years ago

It would be great to have BDD with Playwright

ghost commented 2 years ago

It would be helpful ,if we have BDD along with Playwright.

NagaSivaSankar45 commented 2 years ago

It would be nice to have BDD along with Playwright.

LoneyR001 commented 2 years ago

BDD with Playwright! That sounds great. Looking forward to it.

pbusam commented 2 years ago

It would be good to have the BDD feature, looking forward for it

macroking commented 2 years ago

@pavelfeldman Looks like 90% of the comments and upvotes are well planned, just digging through the user profile, most of the users just opened GitHub account to upvote this request.

May be one particular group of users really need this!

kumars3 commented 2 years ago

Playwright has already got support to write BDD tests using cucumber.js(dependency = "@cucumber/cucumber": "^7.3.1",). I am just wondering whether PlaywrightTestConfig (dependency = '@playwright/test') is supported in BDD tests(GIVEN, WHEN, THEN because the global configuration (const config: PlaywrightTestConfig = { use: {.......) is not being picked automatically as written in https://playwright.dev/docs/test-configuration#global-configuration eventhough I am using playwright test runner.

Looks like the PlaywrightTestConfig works only with 'test' block in .ts or .js file. Can somebody confirm this how to call PlaywrightTestConfig in BDD tests using playwright test runner.

isherkhan commented 2 years ago

Cucumber integration with playwright. Looking forward for it.

AlexKomanov commented 2 years ago

Upvote! Implementation of BDD will be great!!!

nbnds commented 2 years ago

Definitely a needed feature.

NikkTod commented 2 years ago

Cucumber integration with playwright. +1

kumars3 commented 2 years ago

An official cucumber Playwright adapter is needed to use all the features of playwright which works on 'test' block i.e. with @playwright/test test runnier. Please see the comment of @mxschmitt:

https://github.com/microsoft/playwright/issues/12069#issuecomment-1047112096

jgrieger commented 2 years ago

Definitely needed. Integrating with e.g. Cucumber as the test runner is hacky.

testgitdl commented 2 years ago

Do you know when the cucumber integration will be done? This is really needed as not being able to run the tests with playwright test runner is really limiting

mathew-jithinm commented 2 years ago

Would be really great if we have an official support for BDD, for syntaxes like Cucumber, etc.

pixero commented 2 years ago

We are also very much waiting for bdd support in playwright. Now we use cucumber runner and playwright. But I really wanted to be able to also use plywright.config in this case

gitdumi commented 2 years ago

Upvote x1000

lsargent0 commented 2 years ago

+1 for adding Playwright Test Cucumber integration

asdfsafd commented 2 years ago

Pls consider the Playwright/Test-Cucumber integration

r-moore commented 2 years ago

a playwright native bdd test runner would be great

Agustin-DeLuca commented 2 years ago

It would be great to have native bdd in playwright test runner

PavanMudigondaTR commented 2 years ago

It would be awesome to use Playwright Test with Cucumber BDD. I am upvoting behalf of all teams in our company as Test Architect.

natalygoloborodko commented 2 years ago

Adding votes on behalf of my company for this feature.

uzeyirqa commented 2 years ago

Are there any plans to implement this feature request?

benjefferies commented 2 years ago

@kumars3 is perfectly right with https://github.com/microsoft/playwright/issues/11975#issuecomment-1038297911. It's not completely necessary to implement a BDD framework for Playwright however hooks into Playwrights' initialisation need to be exposed so that the Playwright context can be initialised. I've done some digging to try and figure out a way and came up with nothing.

Does anyone know of a workaround here so in setups within other test runners' @playwright/test context can be initialised?

uzeyirqa commented 2 years ago

@kumars3 is perfectly right with #11975 (comment). It's not completely necessary to implement a BDD framework for Playwright however hooks into Playwrights' initialisation need to be exposed so that the Playwright context can be initialised. I've done some digging to try and figure out a way and came up with nothing.

Does anyone know of a workaround here so in setups within other test runners' @playwright/test context can be initialised?

I initialize the browser and context in a beforeAll hook with cucumber js. As for settings like timeout they get picked up from playwright.config.js the only issue I’m having is that I need to configure video and trace recording manually in the hooks they are not picked up from the playwright config.

benjefferies commented 2 years ago

@kumars3 is perfectly right with #11975 (comment). It's not completely necessary to implement a BDD framework for Playwright however hooks into Playwrights' initialisation need to be exposed so that the Playwright context can be initialised. I've done some digging to try and figure out a way and came up with nothing. Does anyone know of a workaround here so in setups within other test runners' @playwright/test context can be initialised?

I initialize the browser and context in a beforeAll hook with cucumber js. As for settings like timeout they get picked up from playwright.config.js the only issue I’m having is that I need to configure video and trace recording manually in the hooks they are not picked up from the playwright config.

I'm experiencing the same issue. It also affects the toMatchSnapshot assertion.

@pavelfeldman this is the 3rd most popular issue on the playwright. Is there any workaround you know of to use another test runner by initialising @playwright/test context in a similar manner?

mytechthingz commented 2 years ago

A lot of companies won't consider using Playwright Test without Cucumber because they would be migrating from their current framework which already supports Cucumber and BDD, and it's an important part of their development process so it's a necessity

ForQA02 commented 2 years ago

@pavelfeldman is it possible to get an update on this please? Even if that's to give a rough timeline or just to say it's not currently on the horizon. This will help people, such as myself, who are looking at automation tools to decide whether they can initially work without Cucumber and integrate it later knowing it's coming within a certain timeframe, or that they just need to use a different tool.