Cypress and Playwright: A Comparison

  Рет қаралды 6,985

Rainer Hahnekamp

Rainer Hahnekamp

Күн бұрын

In this video, I compare the two E2E testing frameworks Cypress and Playwright.
It should give you enough information to make the right decision for your project.
0:00 Welcome
1:33 Technological Approach
16:32 Developer Experience
24:22 CI
33:06 Coding
51:19 Architecture & Extensibility
58:49 Misc. Features
1:04:24 Summary & Farewell

Пікірлер: 28
@fellogenfellogen8928
@fellogenfellogen8928 9 ай бұрын
This was the best framework comparison by far until this day. Although I wasn't as sold on the maturity of Cypress. Mainly because, as you mentioned, there are a lot of edge cases and almost 100+ plugins that in some cases are required to solve them. For me, the amount of quirks and shift away from the nature of JS/TS was too much. Focusing on community support, there is almost one guy that covers these things (ex Cypress Developer?), Gleb Bahmutov. He has covered like 500+ videos, mostly tips and tricks for those weird quirks, and just to name it, he has courses about 20+ plugins for Cypress. I will admit that for the early parts of creating tests and the first flow, yes, Cypress is still ahead of anything else. But when something more complex is going on, and we need to mix that asynchronous behavior or any other Cypress quirk, then it's almost over for a tester who started using this framework. Of course, then there are Gleb's videos and his plugins (they are great), but as you and also Gleb or any developer forget very so often, you are real, full-fledged developers with a vast amount of skills and a huge understanding of not only one framework but many programming languages. For guys like you, it's always like learning the differences and those quirks in the case of Cypress. But for let's say a manual tester who started learning JS and TS and now moves to the automation part and starts Cypress, the starting coding is, as you said, great and easy. But those people will potentially face a huge wall. And in most cases, as you also mentioned, locally Cypress will tell you (sometimes) that you messed up, like chainability with async and this order of execution etc.. But a solution for this comes only from tons of research and not pure understanding of the programming language. For me, if there are experienced people on the team or project familiar with Cypress who could potentially assist someone new to the framework, then yes, Cypress doesn't lag far behind what Playwright offers. However, for manual testers and/or frontend developers accustomed to only working with JS/TS, things will get harsh after a while. The basics are also easy (PW), tho the learning curve is a bit steeper early on. Later, if you encounter any challenging issues, you're still mostly dealing with standard JS/TS. I would also recommend to other viewers to check out your webinar with Manfred Steyer. Although I initially focused on your channel for Cypress/Playwright content, I must say you are a very smart and eloquent person and you put grea amount of substantive information in your videos.
@RainerHahnekamp
@RainerHahnekamp 9 ай бұрын
Hello, first of all, thanks a lot. Those kind of comments are very important to me. About those ptifalls you might fall in Cypress, when you start learning it: So I had to learn it the hard way as well. For a long time you're very happy with your Cypress tests until all of a sudden some start to behave strange. First thing you do, is to ignore them. But when the same kind of patterns come up more often, you have to do something about it. Some start adding cy.wait, some might have a colleague they can ask, others dig into the docs, and others, falsely, accuse Cypress and switch to another framework. But this is something, you have to do with every framework. Regardless if it is for testing, frontend, backend, etc. What I see all the time though, is that developers are writing tests "on the side". They do not have the amount of time to dig into thte details of Cypress because their main "battlefield" lies in the frontend/backend area. The webinar we did, is actually the same is this video. This video has the better video quality though. So you can see the code quite clearly (4K) :) About my channel: I still have to come up with a proper description. Thanks for bringing that on the table. I'd like to do videos about all those topics I encounter as full-stack developer. So don't be surprised, if in the near future a video about Java pops up. That doesn't mean that I don't do any testing-related videos anymore. All the best, Rainer
@safecidafi
@safecidafi 9 ай бұрын
@@RainerHahnekamp hello, thank you for your video, it is clear and interesting. I'm new in the Angular testing domain, not familiar with any testing framework and your video really helped me. I'm in charge of implementing Tests for a bunch of Angular applications and for now im focused on searching what options are available for E2E testing. I learned a bit about the features of Cypress, Playwright, Jest, Puppeteer, Protractor and I was wandering, if i wanted to add a E2E or E2E+Unit test Framework that is : -maintainable on big applications, -that is or will be popular, -with good technical support and documentation, -that won't be abandoned in few years, -that has easy to debug errors, -and is stable and easy to implement if possible From what i've learned, Playwright seems to be a good option, but cypress seems to have more support for now and can also do unit testing, Jest have fewer and fewer problems thanks to the help of Angular devs but they can stop helping with the implementation of Jest at any time. Have you got any recommendation ? i hope my english is correct, keep doing what you do, thank you 🙂
@AmanyZohair-mu3dx
@AmanyZohair-mu3dx 7 ай бұрын
​@@safecidafi I'm the same as you, new in the Angular testing domain and I'm in charge of implementing Tests for 3 Angular applications I really hope @RainerHahnekamp recommends the better framework for that
@unhandledexception1948
@unhandledexception1948 4 ай бұрын
What a helpful comparison, and what deep knowledge of these frameworks the presenter has... very impressive
@RainerHahnekamp
@RainerHahnekamp 4 ай бұрын
Hey, thanks a lot for that big compliment
@i.j.5513
@i.j.5513 8 ай бұрын
Very thorough explanation of the major differences, with illustrative examples and background information. Thank you!
@RainerHahnekamp
@RainerHahnekamp 8 ай бұрын
You are welcome. Always happy if somebody finds one of my videos useful.
@michaeljuliano8839
@michaeljuliano8839 2 ай бұрын
Vielen Dank! Sehr hilfreich.
@RainerHahnekamp
@RainerHahnekamp 2 ай бұрын
Bitte schön. Gerne geschehen der Herr 😉
@ManyakSVK
@ManyakSVK 6 ай бұрын
Hi! Amazing video with really good informations about topic. After few years with angular without any useful knowledge about testing (e2e, automated,...) its hard to choose which framework is best for start in 2024. Now as tech lead i can say i will choose playwright because of easy to use, concurent jobs, no deps, performance and strong base via Microsoft (as you said). I think our experience with testing will grow more and more with possibilities of playwright. (Or maybe im wrong 😃 ). Well done Rainer and thank you for really good work here
@RainerHahnekamp
@RainerHahnekamp 6 ай бұрын
Hi Michal, wonderful. That was actually the goal of this video. To give viewers the possibility to come up with an educated decision. Wish you all the best with Playwright!
@mykhailo7134
@mykhailo7134 4 ай бұрын
great video, thank you
@RainerHahnekamp
@RainerHahnekamp 4 ай бұрын
Hey, thanks as well!
@Oleks-wn9rt
@Oleks-wn9rt 7 ай бұрын
thank you, really great comparison. my take is that Cypress is easier to start with for some engineers who are not familiar with automation/coding yet.
@RainerHahnekamp
@RainerHahnekamp 7 ай бұрын
Thanks, yeah so in terms of DX, Cypress is just great.
@Tonaldo90
@Tonaldo90 6 ай бұрын
Cypress recorder is amazing extension :D so easy to make tests
@RainerHahnekamp
@RainerHahnekamp 6 ай бұрын
Yes, I mean I have to be honest. The whole discussion between Cypress & Playwright and finding theirs strengths feels a little bit like nitpicking. They are both extremely good.
@markodzelajlija8094
@markodzelajlija8094 8 ай бұрын
First of all you for this great video ! I'm someone who was working with Selenium Web Driver for 3 years, then Pw for 2 years. On our new project client want to have e2e tests in Cypress. Our main debate is should we proceed with Page-Object-Model or to use Cypress custom commands and App action. From my point of view, i see only benefits of using POM. We made some demo and it's working great. For every QA team, it's really important to have reusability, maintainability, and readability of test code and that can only be done with POM. Do you think that it's bad approach to proceed with POM, are we doing anti-pattern ?
@RainerHahnekamp
@RainerHahnekamp 8 ай бұрын
One of the main reaons why Cypress discourages commands is that they have seen a lot of overengineering. So devs start to write POMs before the tests and end up spending a majority of their time on maintaining these POMs. As you can overdo almost everything, I do not see this as a valid reason to abandon POMs. I use them also in Cypress. One use case where Cypress commands are better, are queries. Cypress needs to know if a command is a query or something else (action, assertion). Only queries fall into retryability. So if - and maybe you don't have that at all - you have customized queries, use Cypress.addQuery and embed them in your POMs. Short answer: Proceed with POMs. That's fine.
@dr0n63
@dr0n63 6 ай бұрын
Great video. But "recommended approach" for Cy PO are nuts. Who df using commands for add PO? You can easly create PO file (with selectors amd methods) with export class and import it to your test file
@RainerHahnekamp
@RainerHahnekamp 6 ай бұрын
Thanks as for the PO: There is this "relative" famous blog from 2019 about Page Objects in Cypress: www.cypress.io/blog/2019/01/03/stop-using-page-objects-and-start-using-app-actions. This is what I mean with "recommended approach". Page Objects & Cypress is heavily debated topic.
@anasouardini
@anasouardini 7 ай бұрын
I've tried both selenium and playwright, my opinion is: Selenium is garbage; Playwright is only for unit-testing it sucks at scraping. I'm currently learning Cypress, I hope I don't get disappointed again.
@RainerHahnekamp
@RainerHahnekamp 7 ай бұрын
Oh, that's surprising. I'm all ears. Why for unit-testing?
@AndreAngelantoni
@AndreAngelantoni 3 ай бұрын
You'll switch back to Playwright soon.
Angular Testing in 2023: Past, Present, and Future
26:21
Rainer Hahnekamp
Рет қаралды 11 М.
Introducing Playwright
48:53
Rainer Hahnekamp
Рет қаралды 2,9 М.
🤔Какой Орган самый длинный ? #shorts
00:42
You don't need a frontend framework
15:45
Andrew Schmelyun
Рет қаралды 115 М.
Cypress, Playwright, Selenium, or WebdriverIO? Let the Engineers Speak!
1:17:27
Applitools: AI-Powered Test Automation Platform
Рет қаралды 10 М.
Cypress Component Testing in Angular
48:03
Rainer Hahnekamp
Рет қаралды 12 М.
The Big Headless CMS Lie (James Mikrut)
18:14
Vercel
Рет қаралды 51 М.
Here's what I've figured out about Angular signals
8:33
Joshua Morony
Рет қаралды 14 М.
This UI component library is mind-blowing
8:23
Beyond Fireship
Рет қаралды 632 М.
Design Patterns for sustainable automatic E2E Tests with cypress - Christian Dangl
42:51
German Cypress Community Meetup
Рет қаралды 12 М.
GraalVM and Spring
43:14
Rainer Hahnekamp
Рет қаралды 1 М.
NgRx Signal Store Trilogy, Part 1: Why, When, and How?
51:04
Rainer Hahnekamp
Рет қаралды 13 М.
ЛАДОНИ БАСКЕТБОЛИСТОВ (@jebbroskii - TikTok)
0:19
В ТРЕНДЕ
Рет қаралды 1,8 МЛН
Как бесплатно замутить iphone 15 pro max
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 7 МЛН
She bought a gift for her daughter, and dad thought for him😂😳
0:39
Senchiki_social
Рет қаралды 4,6 МЛН
Готовим дошик-ролл за решеткой... с @samsebesushist
0:40
Кушать Хочу
Рет қаралды 2,6 МЛН
Llegó al techo 😱
0:37
Juan De Dios Pantoja
Рет қаралды 53 МЛН
Reuse3♻️
0:25
Yoshipapa / よしパパ
Рет қаралды 10 МЛН