-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] BDD implementation with Playwright test runner #11975
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
BDD implementation with Playwright test runner is what am also looking for.. |
It would be great to have BDD with Playwright |
@unlikelyzero, The package you're mentioning has been deprecated. I am looking for something kind of Native support from the Playwright |
Let's collect upvotes. Please upvote the OP! |
Yeah BBD is a must thing! |
It would be helpful ,if we have BDD along with Playwright. |
BDD support is a perk |
bdd is a good feature to have.. i am using in selenium java.. i need it in playwright to migrate |
I'm looking for bdd too! |
Good to have BDD with playwright |
Having BDD with Playwright will be helpful |
@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. |
BDD is always good to have |
Yes, Looking for BDD to implement playwright in our project. |
BDD is a must-have feature for us too! It really helps. |
Hope playwright will add this BDD feature.. |
i was also looking for same.. BDD will really add value |
I'm looking for BDD too! |
Looking forward to have BDD feature with Playwright, |
It would be great to have BDD with Playwright |
It would be helpful ,if we have BDD along with Playwright. |
It would be nice to have BDD along with Playwright. |
BDD with Playwright! That sounds great. Looking forward to it. |
It would be good to have the BDD feature, looking forward for it |
@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! |
This library went a long way since this post. Have a look at it again. |
Currently using a combination of typescript, playwright and cucumber js. So far its working well, but native support would be great. If it could somehow be integrated into the visual code extension it would take playwright to the next level. |
Native support of BDD would be amazing! |
https://github.com/vitalets/playwright-bdd we are implementing that within our organisation and it is far far far better then any Playwright/Cucumber solution we have tried. being able to use Fixtures and the playwright Config opens up so many more opportunities to make our behave tests far more flexible and simpler to maintain and run. |
I was not aware of this: https://pypi.org/project/pytest-bdd/ can be an inspiration. |
But if you want to share steps across multiple folders pytest-bdd will give
you a world of pain. Somehow using a API Setup step for example only works
If you share it via an increasingly bloated conftest.py. Also there is no
ide integration.
It works in the end, but it's painful.
Using behave feels like a massive improvement after switching, for also
multiple other reasons.
Tally Barak ***@***.***> schrieb am Do., 16. Mai 2024, 15:09:
… I was not aware of this: https://pypi.org/project/pytest-bdd/ can be an
inspiration.
—
Reply to this email directly, view it on GitHub
<#11975 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHRH6QSTIIWLX5PE6GRNENDZCSVZPAVCNFSM5N6IWVZ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJRGUZDANRRGIYA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Eagerly waiting on this feature for a long time. Hoping to see it in an early future release. |
The last remaining person who was working on the Cucumber project has been laid off: |
This is misleading. Matt has been laid off from SmartBear, but the Cucumber project moves on. All cucumber flavors have regular releases. |
Is this under development then? Also interested on this. Thanks! |
Hello, True question: what do you mean by "BDD implementation"? Do you mean something that make Playwright Test runner able to:
Second question: why? IMHO :
Those articles explain this better than me: |
I honestly think that when people is asking about BDD integration, at the end its asking about cucumber step system integration and still use capabilities of playwright runner. |
We would like to use the playwright test runner with our Cucumber feature files. Using the playwright lib with the Cucumber test runner is working but we would love to be able to use all the playwright tools, too. |
@anemer - I couldn't agree more. BDD is about collaboration and not the tools you use.
@nilPPanda - I think you're right. From what I'm reading in this thread, it feels like the desire to "do BDD with Playwright" comes down to three needs:
So let's think through that:
What if you really need Cucumber?So let's go back to @anemer's original question: "do you need Cucumber with Playwright?" Some teams simply like Cucumber and Gherkin. Some teams use Cucumber because it integrates with their internal reporting, documentation, or auditing systems. Some teams need to write their executable specifications in a language other than English, and Cucumber offers an easy way to introduce a translation layer. If this describes your situation, then you'll probably want to stick with Cucumber as a test runner and use Playwright as a web integration tool. You can, however, introduce Serenity/JS into this mix to improve the reporting, code design, and integration capabilities of your framework and avoid having to build everything from scratch. Check out this integration guide and this Serenity/JS Cucumber Playwright project template What if you don't need Cucumber but want great reporting and test design?Now, what if you really want the capabilities and developer experience offered by Playwright Test, great reporting, business-friendly abstractions, but don't want to spend years developing a test automation framework from scratch? What if I told you that you might not need Cucumber at all, even if your team does BDD 🤔 Have a look at my previous comment at #11975 (comment) explaining an alternative approach of using Serenity/JS with Playwright Test as a business-friendly abstraction layer. You might also want to check out: |
I think this feature request is really about to make the Playwright runner extensible in a way that other sub-frameworks can plug in, so that you can use other frameworks (Cucumber, Serenity/JS, etc) to provide test source for the Playwright runner, so that you can use all the benefits that comes form the Playwright runner, but describe your tests in a feature file for example. This is the approach that WebdriverIO uses, see https://webdriver.io/docs/frameworks/#using-cucumber. As many of you have mentioned, you can live and do BDD without this (can use the Cucumber runner, have a BDD-like own naming convention, etc), but still, this would add quite some benefits. |
I agree; it would be amazing if Playwright Test supported a similar mechanism. I think closer integration would be great, and I'd love to collaborate on that; it would, however, require a lot of effort and the maintainers of the various frameworks working together. |
Correct me if I am wrong, but I think we are talking about two different
Things here. There is the playwright Page with it's Tools to interact with
the Browser and there is a test framework with collection of testfunctions,
scoping and testreporting. In terms of Python at least are only talking
about "pytest" the independent unittest framework that is used in the
inspector and the documentation of Playwright. So just changing this to be
used as another option in the inspector and adding a point in the
playwright docu might be enough? You can use nose2, behave, pytest-pdd with
playwright if you "just" import the playwright module and make the page
object available to your test files and test functions.
So If you call your tests with "playwright" you are actually doing a
"pytest" call to collect your test functions from python files which does
not collect .feature files.
Now we want playwright to also "look" for feature files and depending in
that also call either pytest-bdd, unittest or behave instead of pytest or
even implement our own collection mechanism in top of pytest when we do a
"playwright" to run tests.
Am I correct?
Jan Molak ***@***.***> schrieb am Fr., 28. Juni 2024, 12:09:
… I think this feature request is really about to make the Playwright runner
extensible in a way that other sub-frameworks can plug in, so that you can
use other frameworks (Cucumber, Serenity/JS, etc) to provide test source
for the Playwright runner, so that you can use all the benefits that comes
form the Playwright runner, but describe your tests in a feature file for
example.
This is the approach that WebdriverIO uses, see
https://webdriver.io/docs/frameworks/#using-cucumber.
I agree; it would be amazing if Playwright Test supported a similar
mechanism.
There are some interesting challenges here, though. Particularly around
supporting parallel execution and making Cucumber compatible with
Playwright Test's async dependency injection mechanism (given Cucumber's
synchronous nature of the World object -cucumber/cucumber-js#2156
<cucumber/cucumber-js#2156>).
I think closer integration would be great, and I'd love to collaborate on
that; it would, however, require a *lot* of effort and the maintainers of
the various frameworks working together.
—
Reply to this email directly, view it on GitHub
<#11975 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHRH6QQAUCUYY62N5B3WJM3ZJUY4ZAVCNFSM5N6IWVZ2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJZGY2TMMZVGA4Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
That's a great point. I think that when saying "Playwright" many people in this thread mean the "full Playwright experience for Node.js", so the combination of all the various Playwright tools for Node.js: VisualStudio Playwright Test Extension, Playwright Test runner, Playwright UI Mode and Playwright web integration library. Based on my current understanding, VisualStudio Code Playwright Test Extension supports only the Playwright Test runner, and Playwright Test runner is available only for Node.js. And so, the way I interpret the desire expressed in this thread for Playwright to support Cucumber is that "we'd like Playwright Test Extension, Playwright Test runner, and Playwright UI mode to support running and debugging Cucumber.js If my interpretation is correct, this feels like a big ask and a significant development effort. For example, VS Code extension would need to integrate with or replicate the behaviour of the Cucumber extension for VS Code, Playwright Test runner would need to integrate with Cucumber.js, Cucumber.js would need to be made compatible with Playwright's fixtures mechanism, to mention but a few key points.
Yes, this is what I was referring to in - #11975 (comment) However, not using Playwright Test means you can no longer use the VisualStudio Code Playwright Test Extension, or the Playwright UI Mode. The approach I recommend to teams using Playwright for Node.js is to use Playwright Test runner, take advantage of Playwright Test extension for VS Code or the Playwright plugin for JetBrains IDEs, and use Serenity/JS Playwright Test integration to introduce business domain language and abstractions and provide more advanced test reporting features. |
I'll just add that with |
Hi Friends. Do you have the same sample repo project for PlayWright with BDD frame work java. Is there a mail id to reach out to get hep reg this? |
this is a must feature please add Gherkin (BDD) support natively in playwright |
Good to have BDD with playwright |
Good to have cucumber step system integration with playwright. |
Upvoting this as well. |
Could this be locked? I'd love to get real updates, but endless "upvoting" comments make me want to unsubscribe. |
For now I would recommend using this https://github.com/vitalets/playwright-bdd. @jan-molak I could make it work to run with serenity/js but the test report is broken...I think I will need to create an adapter to make it work with reporting. I think I will need some explanation about how I can do that. |
BDD is must |
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 😉
The text was updated successfully, but these errors were encountered: