Cypress in 100 Seconds

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ก.ย. 2024
  • Cypress is a complete testing solution for web developers. It uses a browser-based test-runner to visually validate your JavaScript code and makes test-driven development fun.
    #webdev #js #100SecondsOfCode
    🔗 Resources
    Cypress Docs docs.cypress.io
    TDD Explained • Test-Driven Developmen...
    Free E2E Course from ‪@DevAcademyCom‬ courses.dev-ac...
    🔥 Get More Content - Upgrade to PRO
    Upgrade to Fireship PRO at fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.
    🎨 My Editor Settings
    - Atom One Dark
    - vscode-icons
    - Fira Code Font
    🔖 Topics Covered
    - Testing with Cypress Basics
    - What is Cypress?
    - Cypress vs Jest
    - Cypress vs Jasmine
    - JavaScript Testing
    - JavaScript TDD
    - JavaScript BDD

ความคิดเห็น • 413

  • @leoaso6984
    @leoaso6984 2 ปีที่แล้ว +1654

    Ah yes, automated UI testing. That thing I'm definitely absolutely positively going to start doing... one of these days.

    • @ASDFG856
      @ASDFG856 2 ปีที่แล้ว +28

      I have never seen a comment I relate more with.

    • @SpongeAndLeo
      @SpongeAndLeo 2 ปีที่แล้ว +3

      I basically exclusively test network calls using cypress these days. Powerful framework.

    • @daniel29009
      @daniel29009 2 ปีที่แล้ว +1

      Meet converted pyramid, tapes server and unit size discovery.

    • @attila2246
      @attila2246 2 ปีที่แล้ว +1

      So all your PR's get accepted with 0 unit tests?

    • @leoaso6984
      @leoaso6984 2 ปีที่แล้ว +23

      @@attila2246
      Me: Hey, I just created a new button component. Pls review.
      Me: OK, but you didn't add any unit tests.
      Me: uhhh yeah, but... when I opened the browser and clicked it, it did the thing.
      Me: ...........eh, good enough for me **merges PR**

  • @negary666
    @negary666 2 ปีที่แล้ว +381

    I don’t even do web development but these videos are just too entertaining

    • @dmiradakis
      @dmiradakis 2 ปีที่แล้ว +5

      Can confirm, I’ve been sucked in.

    • @SirusStarTV
      @SirusStarTV 2 ปีที่แล้ว +18

      It's interesting that for someone it's entertainment but for others it's boring af

    • @n3vin192
      @n3vin192 2 ปีที่แล้ว

      Same.

  • @andreas543
    @andreas543 2 ปีที่แล้ว +561

    Suggestions for 100 second tuts:
    - Oauth2/OpenID Connect
    - Swagger/OpenAPI 3
    - Logging/Monitoring
    - Caching solutions
    - Phaser 3

  • @recnepSpencar
    @recnepSpencar 2 ปีที่แล้ว +521

    Been using Cypress for a year. Absolute game-changer over Selenium, webdriverio, and protractor.

    • @StEvUgnIn
      @StEvUgnIn 2 ปีที่แล้ว +23

      Those tools are not for testing but for scraping

    • @riddixdan5572
      @riddixdan5572 2 ปีที่แล้ว +26

      have you ever looked into Playwright? if so, what are your thoughts?

    • @rasmusfalk-jensen8221
      @rasmusfalk-jensen8221 2 ปีที่แล้ว +35

      @@StEvUgnIn That is just not true.
      Both WebdriverIO and Protractor were built for testing purposes. While Selenium might just be a tool for browser automation, it has seen wide use for testing purposes as well.

    • @recnepSpencar
      @recnepSpencar 2 ปีที่แล้ว +12

      @@StEvUgnIn You’re not wrong that it can be used for scraping. Any E2E tool would do the trick well. It’s primary purpose thing is testing. Puppeteer is more what you’re thinking of for scraping.

    • @SpinnedRock
      @SpinnedRock 2 ปีที่แล้ว +7

      So if I am still using selenium, you would recommend me to change to cypress? ;-)

  • @Tygrysek_
    @Tygrysek_ 2 ปีที่แล้ว +56

    Cypress is pretty fun, but sometimes really tricky.
    The funniest part of it for me was when I had to do conditional testing, and I was new to Cypress. I relied on the docs and I found a section for conditional testing. It states:
    "don't worry, there are ways you can do with conditional testing! for example, you can... remove the need to do conditional testing!"
    Thank you Cypress, very cool.
    PS: No, I couldn't do that

  • @MisterAndreSafari
    @MisterAndreSafari 2 ปีที่แล้ว +16

    I have to say it again: your „video-editing“ and „story-telling“ skill is OUT of this world 😄
    Thank you so much for your work 🙏

  • @PfhorShark
    @PfhorShark 2 ปีที่แล้ว +11

    Been using cypress for 3 years after using selenium for god knows how long. I highly recommend this for TDD, your feedback cycle is almost immediate, you aren't coupled to chrome/driver versions, it's altogether the best way to write your integration tests first, see them not work, then repeatedly do the next thing it said didn't work. Simple.

    • @erick289777
      @erick289777 ปีที่แล้ว +1

      Did you solve the lack of support of iFrame and multitab from Cypress?

  • @vicradon
    @vicradon 2 ปีที่แล้ว +29

    Thank you Jeff for another amazing 100-second tutorial. Anytime Jeff explains a concept, it becomes easier and more approachable for me.

  • @JohnBrandon
    @JohnBrandon 2 ปีที่แล้ว +14

    I will almost certainly never use this, but the clarity and quality of your videos is so outstanding that I can’t get enough. Thanks!

  • @deathlight128
    @deathlight128 2 ปีที่แล้ว +83

    Cypress is awesome! I've spent more time debugging the jest config than testing the code base !

  • @MrBloodySpirit
    @MrBloodySpirit 2 ปีที่แล้ว +46

    For me, I moved from Cypress to Playwright. It's much faster and can do almost everything Cypress can!

    • @JPeetjuh
      @JPeetjuh 2 ปีที่แล้ว +10

      That, and, so much of Cypress bugs me. Its Promises are not actual native browser Promises and can't be awaited. The magic strings for assertions. And if I wanted to see how many rows a table has, then submit a form and check if that table now has count + 1 rows, Cypress seems to actively hinder me. I found Playwright much more intuitive, friendly and robust. The only thing I really liked about Cypress was its execution window where you could "time travel" as Jeff says.

    • @threewestwinds
      @threewestwinds 2 ปีที่แล้ว +6

      ​@@JPeetjuh The promises thing is super annoying, and agree that the magic strings are not my favorite way of doing assertions.
      Even though it has a promises-like API, Cypress is actually a command queue, not a promise chain. The use of promise-like syntax (and especially the docs trying to say it's promise-based) is very misleading, 100%.

    • @graffhyrum
      @graffhyrum 2 ปีที่แล้ว +2

      The cross domain restrictions and local single threading are also pretty annoying.

  • @nathanlamaire
    @nathanlamaire 2 ปีที่แล้ว +8

    Good thing about using these tools is that it also helps you to narrow down use-case of the application you make and only implement essentials.

  • @darkknightdks
    @darkknightdks 2 ปีที่แล้ว +2

    Absolutely love your videos.
    I have been using Cypress for over a year now and I don't want to go back to those Protactor, Selenium stuff.
    Also, Cypress has something called `data-cy`, which is added to the elements that you want to loop up in your tests. `data-cy` parameter can have a unique name and enables the test to directly find the element in the dom. This is an amazing feature that we use everyday and avoid looking up using html and css tags as they can change.

  • @shaneckel
    @shaneckel 2 ปีที่แล้ว +1

    This is the first time I've ever responded to a TH-camr request ever in the decade of watching TH-cam videos but yes, I would like to see more algorithm videos. Excellent explanation of the search. This feels weird. Great work on everything you post.

  • @nicolasramos7084
    @nicolasramos7084 2 ปีที่แล้ว +2

    I've literally started working with cypress for our application at work this morning. Awesome timing as usual

  • @seantillman7490
    @seantillman7490 2 ปีที่แล้ว +10

    I just started testing with Cypress this year, it's been real cool to use. Thanks for the videos as always!

    • @danisnicee_
      @danisnicee_ 8 หลายเดือนก่อน

      How's it going so far man?

  • @CodingWithLewis
    @CodingWithLewis 2 ปีที่แล้ว +1

    Cypress is seriously such a game changer

  • @savaasio
    @savaasio 2 ปีที่แล้ว +5

    the line "to figure out precisely why your code sucks" is so hilarious to me

    • @rajanlalala
      @rajanlalala 5 หลายเดือนก่อน

      😁

  • @mstjepan7237
    @mstjepan7237 2 ปีที่แล้ว +2

    Litteraly started learning Cypress yesterday, its so amazing for testing

  • @WebDevYTLearningAccount
    @WebDevYTLearningAccount 7 หลายเดือนก่อน

    Thank you for the quick video. I am on a different team temporarily and this helps me better understand the purpose since I have mostly written backend code.

  • @SoreBrain
    @SoreBrain 2 ปีที่แล้ว

    Starting into web development is great especially when you are able to enjoy such amazing content

  • @RemX405
    @RemX405 2 ปีที่แล้ว +6

    This and TestCafe make E2E an absolute breeze for any web dev.

    • @aylictal
      @aylictal 5 หลายเดือนก่อน

      I had to make the choice of using testcafe over cypress for my company 3 years ago. Main reason was cypress didn't support safari, nor s.

  • @OfficeArcade
    @OfficeArcade 2 ปีที่แล้ว +2

    I’m a big cypress advocate. Absolute game changer!

  • @jon1867
    @jon1867 2 ปีที่แล้ว +4

    If it were me, I wouldn't use it for unit or integration tests. But it's amazing for UI or E2E tests

  • @TomDoesTech
    @TomDoesTech 2 ปีที่แล้ว +2

    You forgot to add the part about nobody ever maintaining the tests

  • @SpongeAndLeo
    @SpongeAndLeo 2 ปีที่แล้ว

    Been using cypress for 4 years. It's incredibly powerful and I love it.

  • @kristofgilicze
    @kristofgilicze 2 ปีที่แล้ว +6

    I like Cypress, it really does work like a charm.
    One thing to note is that the Electron runtime is bundled / baked in, which arguably is pretty stupid.
    There is no way to install Cypress headless, even though most people use a real browser to run tests.

    • @DaraulHarris
      @DaraulHarris 2 ปีที่แล้ว +2

      > There is no way to install Cypress headless
      I was wondering how I might use it to do my automated testing in gitlab-ci. The docs mention being able to do this, though.

    • @threewestwinds
      @threewestwinds 2 ปีที่แล้ว +2

      @@DaraulHarris Cy can absolutely run in CI. Doing an npm install also downloads the cypress binary, which is fairly large, and comes with electron baked in.

    • @davloche6763
      @davloche6763 2 ปีที่แล้ว

      There is a headless mode for your tests 😉

    • @kristofgilicze
      @kristofgilicze 2 ปีที่แล้ว

      There is headless mode, though Electron included no matter what.
      The "slim" docker CI image is roughly 600 mb. To be fair this includes Chrome and FF also.

  • @aryasaktiflister_aw
    @aryasaktiflister_aw 2 ปีที่แล้ว

    idk what a rails dev like me is watching this for but that looks cool

  • @joshuaokoro9447
    @joshuaokoro9447 2 ปีที่แล้ว

    From my experience using Cypress, I can see it really makes testing fun. For me, the fun part is watching Cypress run the test and everything passes. Definitely give it a try if you haven’t. Might end up loving it

    • @galgrunfeld9954
      @galgrunfeld9954 2 ปีที่แล้ว

      I've been avoiding learning testing for years just because it was so boring for me. Even when I sat down with myself and asked myself what technologies I should learn to become a better well-rounded full-stack developer, testing was in there, but was always the last one I wanted to do.
      So I learned a few technologies, but never picked up testing. But this framework makes me actually want to learn it, seems so cool!

    • @joshuaokoro9447
      @joshuaokoro9447 2 ปีที่แล้ว

      @@galgrunfeld9954 I ran away from testing for so long until I started seeing the importance. Especially working with a team with constant update, testing would catch a lot of bugs before it gets to staging or production. These frameworks have made it enjoyable so that’s a bonus. Funny thing, I’m the one now rooting for testing

    • @galgrunfeld9954
      @galgrunfeld9954 2 ปีที่แล้ว

      @@joshuaokoro9447 yeah, I'm very much aware of the benefits. Luckily, or maybe not, I so far worked only in small teams and did a lot of things independently so TDD wasn't much of a necessity, but I can definitely see it being crucial in so many places.

  • @jacobshuman1650
    @jacobshuman1650 2 ปีที่แล้ว +4

    I’d love one of these videos for playwright! I tried cypress and while it was really cool (especially with the test runner) it felt a bit dated imo. The lack of native promises really hurt my experience.

  • @MineToaster12
    @MineToaster12 2 ปีที่แล้ว +12

    I prefer playwright over cypress, it's more robust though ofc looks less fancy than cypress.
    What cypress killed for me is them not support any http/3

    • @HankyAd
      @HankyAd 2 ปีที่แล้ว +1

      I really like using Playwright, but it just doesn't work in CI for more than a week before something explodes and it stops building
      I should look into putting it into a docker container

    • @EricSundquistKC
      @EricSundquistKC 2 ปีที่แล้ว

      Also left Cypress for Playwright, as getting our auth in all the tests was a nightmare in Cypress

    • @threewestwinds
      @threewestwinds 2 ปีที่แล้ว +1

      Cypress's coming support for cross-domain communication (and the Sessions API) should make auth a lot less painful. Of course, "It's coming" is not the most useful answer. ^^;;

  • @mahmudzaman5445
    @mahmudzaman5445 2 ปีที่แล้ว +2

    Really cool. Planning to use it on my next side project.

  • @edgarhnd
    @edgarhnd 2 ปีที่แล้ว

    I was about to launch my app to production without testing at the end of the week.. Thanks, that seems to be exactly what I need !

  • @brightpixeluk
    @brightpixeluk 2 ปีที่แล้ว

    Been using Cypress with TestingLibrary and MSW for a while and they are great for getting tests done fast.

  • @vnm_8945
    @vnm_8945 2 ปีที่แล้ว

    I worked as an automation tester using Cypress, it was cool.

  • @weikeshi1788
    @weikeshi1788 2 ปีที่แล้ว +1

    Just started to write tests for my project, and see this today

  • @moazahmed5388
    @moazahmed5388 2 ปีที่แล้ว

    I've just experienced my first BSOD for a while , while watching this video. it makes sense now .

  • @damar1967
    @damar1967 2 ปีที่แล้ว

    100 Seconds video ideas:
    - Backing up hard drive
    - Wiping history
    - Getting some RAM a few megabytes
    - Logging in and logging out

  • @logichog4181
    @logichog4181 2 ปีที่แล้ว +1

    thanks for this one bro, I needed it

  • @amoodaa
    @amoodaa 2 ปีที่แล้ว

    We've ended up using playwright instead of cypress, had some problems with ts with cypress, and playwright setup was just smooth as butter

  • @skriptkid4292
    @skriptkid4292 2 ปีที่แล้ว

    this is awesome, i didnt even know what cypress was 100 seconds ago

  • @mohammadfarhanr6650
    @mohammadfarhanr6650 2 ปีที่แล้ว +2

    This content is always awesome. I am always curious how you can manage so many different techs, do you have experience using them throughout your career? Or do you just learn it like 1 week and make a video of it? or how? I am always amazed by how you deliver your content.

  • @parthipankalayini8
    @parthipankalayini8 2 ปีที่แล้ว +9

    Sir, waiting for more rust lang and golang videos 🙌

  • @ibadsiddiqui1
    @ibadsiddiqui1 2 ปีที่แล้ว +3

    just what I needed! 🤩

  • @awabqureshi814
    @awabqureshi814 2 ปีที่แล้ว +1

    I'd love to see a purescript video! Maybe even a beyond 100 seconds on it too.

  • @nullpointer1755
    @nullpointer1755 2 ปีที่แล้ว +2

    Can you make a video about Data Oriented Programming and ECS (Entity Component Systems) ?

  • @devmeta1478
    @devmeta1478 2 ปีที่แล้ว

    Okay, I guess my company just made another decision and that is which testing tool to use for front-end. :D Thanks Jeff

  • @recker7017
    @recker7017 2 ปีที่แล้ว

    this channel is becoming very js oriented

  • @eliascotrim51
    @eliascotrim51 2 ปีที่แล้ว +2

    What are the advantages of something like Jest compared to Cypress?

  • @evanhruskar
    @evanhruskar 2 ปีที่แล้ว

    I've been waiting for this video. The automatic loading feature doesn't always work properly (doesn't work for XHR requests). But It's 100x better than Selenium. Highly recommended.

  • @PBKB
    @PBKB 2 ปีที่แล้ว

    I'm using Playwright. Amazing tool. Build a suite to test all our countries (work for a B2B supplier)

  • @PhilipAlexanderHassialis
    @PhilipAlexanderHassialis 2 ปีที่แล้ว +1

    Excellent video as always! And now that you are delving into test territory, how about a nice vitest in 100 seconds? I think its time!

  • @siydge
    @siydge 2 ปีที่แล้ว +1

    My bud who I work with is from Cyprus, he's going to go crazy after seeing this video...
    Likely for both the name and what it does.

  • @Rey_R_
    @Rey_R_ 2 ปีที่แล้ว +6

    E2E test is great if used properly. Never test all the things only with E2E. Make a lot of unit and integration tests. Then, test the end-user journey with E2E test.

    • @tomascarignano5002
      @tomascarignano5002 2 ปีที่แล้ว

      Could you explain real quick why?

    • @Eagle3302PL
      @Eagle3302PL 2 ปีที่แล้ว +1

      @@tomascarignano5002 It's mostly about cost, e2e test take longer to run, longer to develop, are more brittle (prone to failure) and more time consuming to maintain than integration/unit tests.

  • @GautamKhatter
    @GautamKhatter 2 ปีที่แล้ว

    Next video should be “Types of tests” in 100 seconds.

  • @rtemis9016
    @rtemis9016 2 ปีที่แล้ว

    finally found what I needed. thanks Jeff !

  • @DogeMultiverse
    @DogeMultiverse 2 ปีที่แล้ว +5

    Was just looking at javascript testing! How do you always come up with timely content? Thanks again!

  • @rafsoverflow
    @rafsoverflow 2 ปีที่แล้ว

    I'm trying my hardest to dig myself out of tutorial hell but you keep making these awesome videos that make me want to dig myself deeper. Fireship is not good during tutorial rehab.

  • @emstudios14
    @emstudios14 2 ปีที่แล้ว +1

    This is so cool.

  • @its_vincesanity
    @its_vincesanity 2 ปีที่แล้ว

    I really love cypress ❤️ Even now I have to use React, I feel save to delivery some quality 🙌🏻

  • @Patrickdaawsome
    @Patrickdaawsome 2 ปีที่แล้ว

    Playwright is a great lowkey Cypress alternative.

  • @erik9817
    @erik9817 9 หลายเดือนก่อน

    Nice! Does any of you Cypress pros know if it allows for checking the order or Redux actions in the Redux Chrome tab?

  • @TheMrBvcx
    @TheMrBvcx 2 ปีที่แล้ว

    Fireship is a modern hero

  • @dadsfads
    @dadsfads 2 ปีที่แล้ว +2

    Can you do one on Cypress Hill next?

  • @shlemekian
    @shlemekian 2 ปีที่แล้ว

    Currently trying to decide between Cypress and Playwright for e2e testing on a large project at my job. What's the chance you have a playwright video on the way? :) Great stuff as always.

  • @ArnavSingh-im5bj
    @ArnavSingh-im5bj 2 ปีที่แล้ว

    More about cypress please and also about load testing of APIs

  • @diegolikescode
    @diegolikescode 2 ปีที่แล้ว +1

    good content, as always.

  • @spencjon4822
    @spencjon4822 2 ปีที่แล้ว

    'Love Cypress, highly recommend

  • @Kawacozy
    @Kawacozy 2 ปีที่แล้ว +5

    I want to clarify that in many SPA projects, cypress is a bad choice, leads to flaky tests. I'd recommend playwright if you use react and etc.

  • @Zandercraft
    @Zandercraft 2 ปีที่แล้ว

    "To figure out precisely why your code sucks..."
    Lol! I feel called out for some reason.

  • @konnilol4
    @konnilol4 2 ปีที่แล้ว

    I like how it just isn't "if" or even "when" anymore but straight up "why your code sucks"

  • @BillyHudson1
    @BillyHudson1 2 ปีที่แล้ว

    This video got me into cypress, pretty f-n dope. I still need testing for Electron tho so I'm using Playwright since Spectron just got deprecated. Need to decide if I should switch from Mocha to Playwright Test as my Electron test runner.

    • @BillyHudson1
      @BillyHudson1 2 ปีที่แล้ว

      Though reading these comments maybe the right choice is to go full on playwright. I'm still investigating. I do like how cypress works but obviously a lot of the pain points I hit already are a common thread.

  • @manavsharmaer
    @manavsharmaer 2 ปีที่แล้ว

    Please make some videos on load testing tools

  • @dinosaric4862
    @dinosaric4862 2 ปีที่แล้ว +1

    Love your videos!

  • @maticz3923
    @maticz3923 2 ปีที่แล้ว +1

    Make a video about the CSV file type
    You woukd just say its values separated by commas and then stay awkwardly silent for the rest of the time

  • @connorallen162
    @connorallen162 2 ปีที่แล้ว

    It's funny how I watch these videos once and I'm like "that's neat" then a month later I'm like "wait if I actually used that it could absolutely transform my development workflow!"

  • @futballboy101
    @futballboy101 2 ปีที่แล้ว

    Do a video of cucumber bdd integrated with cypress. This brings the three amigos together and speak the same language. Let me know if you’d like some insight as to why this approach is amazing.

  • @LiamODonnellDev
    @LiamODonnellDev 2 ปีที่แล้ว

    I was struggling with something in webdriver and it looks like Jeff and the Algorithm (good name for a band) delivered Just In Time ;)

  • @so-dz3px
    @so-dz3px 2 ปีที่แล้ว +1

    Cypress for UI and PactumJS for API

  • @diogo405
    @diogo405 2 ปีที่แล้ว

    Liking before watching 👍🏽

  • @nadavbarsheshet2512
    @nadavbarsheshet2512 2 ปีที่แล้ว

    Thank you! Can you please do Julia next?

  • @tyrizzle3
    @tyrizzle3 2 ปีที่แล้ว

    Do one of your things on R! I don't think I'm allowed to say I know how to code till you do 😅💪👍🧠

  • @_sevelin
    @_sevelin 2 ปีที่แล้ว

    What a coincidence, I was learning Cypress right now already.

  • @neonai9213
    @neonai9213 2 ปีที่แล้ว

    maybe do some more non-frontend-oriented stuff like neural networks (tensorflow, pytorch) or some other interesting stuff like a turing machine

  • @imusingwindowsbtw1469
    @imusingwindowsbtw1469 2 ปีที่แล้ว

    This is why I develop command line utilities.

  • @reggiemate7288
    @reggiemate7288 2 ปีที่แล้ว

    Now I will defs test my own projects /s

  • @NicolasPare
    @NicolasPare 2 ปีที่แล้ว +1

    I'm not sure I need a sophisticated tool to tell me my code sucks, I have co-workers for that!

  • @williammoriarty3402
    @williammoriarty3402 2 ปีที่แล้ว

    Here is a sincere suggestion, can you please do one on julia?

  • @aaronbell5994
    @aaronbell5994 2 ปีที่แล้ว

    These little jabs always make me laugh 0:39 😂

  • @PatricioHondagneuRoig
    @PatricioHondagneuRoig 2 ปีที่แล้ว +1

    Cypress is love. I don't wanna touch Selenium ever again.

  • @amy2technology87
    @amy2technology87 2 ปีที่แล้ว

    I enjoy your background classic. Where Can I found it?

  • @PhongNguyen-ow9ly
    @PhongNguyen-ow9ly 2 ปีที่แล้ว

    How about making a video about new features in React 18?

  • @Wangssta
    @Wangssta 2 ปีที่แล้ว

    Is it realy a legit way to do tdd and replace unit tests on frontends? So there would be a unit test and e2e test section in your cypress folder? I somehow like the idea but it doesnt feel natural 😂

  • @jtdyalEngineer
    @jtdyalEngineer 2 ปีที่แล้ว

    What is "javascript business logic" ? Where is it used? As a SW Dev I need to know?

  • @adi.ranjan007
    @adi.ranjan007 2 ปีที่แล้ว

    Are you fucking psychic, just needed this ❤️

  • @travispulley5288
    @travispulley5288 2 ปีที่แล้ว +1

    I tend to use puppeteer for everything, and I've used cypress, but what exactly are the advantages over puppeteer for testing? Is it the structure/interface and framework? Can/should I use both together?

    • @threewestwinds
      @threewestwinds 2 ปีที่แล้ว

      Biggest advantage over puppeteer is the builtin retries / waiting for the page to settle. No more explicit need to wait for a loading spinner to be gone - just assert the content is there, and Cypress will retry until it is or until the command times out. This sort of functionality is built into basically every command. It's amazing the amount of "just works" you can get out of that.

    • @travispulley5288
      @travispulley5288 2 ปีที่แล้ว

      @@threewestwinds there are different meanings of a page having settled (DOMContentLoaded event? network idle?) , and puppeteer has them all covered. Messy wait techniques are why I quit using selenium, but that's not something puppeteer lacks at all

    • @threewestwinds
      @threewestwinds 2 ปีที่แล้ว

      ​@@travispulley5288 By "page to settle'" I don't just mean during page load events - I mean every command you issue, which causes rerenders as data loads in, spinners, animations, outgoing requests.
      Using Cypress you usually don't even need to *think* about waiting at all. I just assert or act on the desired end state. You can click on buttons that don't exist yet, and Cypress will wait until the button exists and then click on it.
      It's been a couple years since I used Puppeteer. But this was the biggest benefit for me. No 'filler' commands (like "wait for element to exist, then click on it"). You just say what you want. Less code, less mental effort.

    • @travispulley5288
      @travispulley5288 2 ปีที่แล้ว

      @@threewestwinds pptr has all these wait styles baked into everything. If you're trying to interact with an element that's not present, it's helpful to know that it's not present and to treat that as an error (and/or wait for the implicit timeout). Even with my lack of Cypress experience, I know you'll just end up waiting for the max timeout duration in those cases anyways if the element never appears.
      What I'm getting from this is that they both do the same thing, but cypress has a friendlier companion UI? I need to do more research.

  • @imerence6290
    @imerence6290 2 ปีที่แล้ว +3

    Video idea: HTML over the wire frameworks

  • @masrafirinvi
    @masrafirinvi 2 ปีที่แล้ว

    Helpful! Thank you so much❤️

  • @owenwexler7214
    @owenwexler7214 2 ปีที่แล้ว

    My company would not have gotten testing done as quickly as we did without Cypress.

  • @GlitchyPSI
    @GlitchyPSI 2 ปีที่แล้ว

    wow OK cypress looks super cool