Skip to content
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

Cypress vs. Playwright: end-to-end testing showdown #349

Open
utterances-bot opened this issue Aug 18, 2022 · 6 comments
Open

Cypress vs. Playwright: end-to-end testing showdown #349

utterances-bot opened this issue Aug 18, 2022 · 6 comments

Comments

@utterances-bot
Copy link

Cypress vs. Playwright: end-to-end testing showdown

Like Cypress, Playwright is also a framework for end-to-end testing. Find out what are some of the differences and write your first Playwright test!

https://silvenon.com/blog/e2e-testing-with-cypress-vs-playwright

Copy link

I have mixed feelings. I like that Playwright is faster, but I do like that Cypress runs tests in the browser itself, i.e. I can use any JavaScript library to run those tests. In Playwright, you will need to rewrite logic to make it playwright specific – like the example of @testing-library/cypress.

Copy link
Owner

You can make your own custom library that provides helpers like Testing Library does, which uses Playwright under the hood, if you want to. Did I understand correctly?

Copy link

You can, just means that you are now building tools specific to Playwright, as opposed to using browser APIs.

Copy link
Owner

You can use browser API by evaluating JavaScript, I think that way you can build @testing-library/playwright just like @testing-library/cypress.

Copy link

Safari "This helped me catch a CSS bug that I would otherwise probably never catch."

Just curious what the issue is and how you caught it? Normally we write tests that find and do stuff with dom elements, not CSS. did you test pass in chrome but fails in safari?

Copy link
Owner

silvenon commented Sep 1, 2022

Something was causing the page to overflow horizontally in Safari, I can't remember what, though. The point is that the overflow test was failing on Safari, that's how I caught the problem.

As you say, usually it's hard to test for CSS problems, but in this case the problem was easy to detect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants