Rayrun
← Back to Discord Forum

cucumber-playwright integration

Ali Kiyancicekposted in #help-playwright
Open in Discord
Ali Kiyancicek

Hi everyone. What are real problems when using cucumber with playwright? I mean which functionalities can be lost using cucumber into my Playwright automation framework. Thank you .

This thread is trying to answer question "What are the real problems when using Cucumber with Playwright and which functionalities can be lost?"

4 replies
refactoreric

Disclaimer: I have never used Playwright together with Cucumber. Still, I think the high-level answer would be that you can use anything from the Playwright /library/, but not from the @playwright/test runner.

Since you are using another runner, namely Cucumber, you would have to rely on Cucumber's mechanisms for parallel execution, retries, etc.

And I suppose Playwright's UI mode will not work, Playwright's vscode extension won't work with Cucumber, etc.

Still I suspect the integration of Cucumber and Playwright is quite appealing and capable. Depending on your needs, it may still be the right choice. Here's a starter repo from Tallly Barak: https://github.com/Tallyb/cucumber-playwright

Maybe if she's around she'll give you a more detailed and informed answer.

.aleksandaraleksandrov
.aleksandaraleksandrov

Hello Ali, I am using Cucumber with Playwright at the moment. After watching this: https://www.youtube.com/watch?v=bfWXNLqKlvA&list=PL699Xf-_ilW6KgK-S1l9ynOnBGiZl2Bsk&index=1. But you have to be careful because he deletes some files and folders in the video, and if you have any Automated tests, they probably won't work. But if you don't delete it, everything works fine 🙂

The final test runs are not with "npx playwright test", but the videos are helpful and descriptive.

Playwright test runner features are completed missed, again you could achieve some of them programmatically

You can use this -> https://github.com/vitalets/playwright-bdd It is cucumber with playwright runner, so you do not miss any important features.

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.