Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

2022 one should not start a new project with Cypress. Playwright is simply so much better.


Agreed. I started a project with Cypress a year ago (having used Cypress for more than a year at that time) but then had to switch to Playwright and have been quite happy with it 200 tests later. PW is able to do everything I needed from Cypress and has much better performance (easy parallelism and sharding) and has tracing/video recording in the free version. PW also uses regular JS promise versus the mysterious half-async-half-sync Cypress commands. A less mentioned distinction between the 2 is that Cypress also runs in the browser main thread and I’ve observed that this interferes with React 18 applications that use concurrent rendering so tests become unreliable (not the case with PW). One thing PW lags behind is the interactive test runner and I think they’re working on it.


I've been a long time Cypress user, but recently have been feeling those pain points you mentioned, the half-async-half-sync APIs are driving me mad :)

Im interested in Playwright, but wondering how you find the visual runner compared to Cypress? Are you able to run your tests in the browser and use a `debugger` or dev tools?


PW’s test inspector is pretty good. You can step through your test code and debug selectors. The inspector also runs in headed mode so you have the regular browser’s dev tools. The only thing left I want from PW is for PW to automatically rerun a test when it’s changed.

https://playwright.dev/docs/debug


Playwright is nice and lightweight but bit barebones compared to Cypress, leaving you to decide for many things.


Cypress is also missing some pretty fundamental things, like tabbing through the document using the tab key. I don't know how people test for accessibility without this.

I haven't done JS for awhile, but according to https://docs.cypress.io/api/commands/type#Events they still don't support it. The docs point you to a third party package that tries to simulate it inside the page.


Can you elaborate please on that? Just starting on a new project where they have used playwright, but I never tried it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: