How to use Cypress to write E2E Tests over a Registration Page

Sdílet
Vložit
  • čas přidán 15. 07. 2024
  • Showing an overview of how to write cypress tests to verify a registration form shows errors and redirects the user
    00:00 talking about e2e testing
    02:20 getting started with cypress
    ------------
    🤑 Patreon / webdevjunkie
    🔔 Newsletter eepurl.com/hnderP
    💬 Discord / discord
    📁. GitHub github.com/codyseibert/youtube
    credits:
    www.freepik.com/vectors/dynamic - Dynamic vector created by pikisuperstar - www.freepik.com

Komentáře • 25

  • @truthseeker2171
    @truthseeker2171 Před rokem +3

    I had chatgpt help in doing this and for long time I was not getting everything woring right, I am not saying chatgpt was wrong but I didn't take a tutorial and was looking for a fast way to test the frontend even though I am mainly a backend person. The first 10:24 minutes of this video cleared everything up for me and I was able to write tests for both /login and /register pages in no time. Thank you.

  • @tzuilee588
    @tzuilee588 Před 2 měsíci

    Find this super helpful, thank you for explaining!

  • @angiehempkmeier
    @angiehempkmeier Před 8 měsíci

    amazing video, thank you for sharing. it was very useful!

  • @sergio.808s
    @sergio.808s Před rokem

    great tutorial, thank you!

  • @sardormajano
    @sardormajano Před 7 měsíci

    Great video!

  • @betterworldwithts
    @betterworldwithts Před 2 měsíci

    great job, man!

  • @nirmalfernando6217
    @nirmalfernando6217 Před 3 měsíci

    Great Video. I am trying to set up Cypress e2e code coverage for my next app. Do you have any information about achieving this. I managed to configure it correctly but I am not seeing the coverage repost updating it values

  • @galactusclb5733
    @galactusclb5733 Před 2 lety

    ❤️😇

  • @user-hx7kg8nm6y
    @user-hx7kg8nm6y Před 10 měsíci

    can you make a video of :how to use ts as the language instead of js

  • @AlexTUBEProd
    @AlexTUBEProd Před 6 měsíci

    You don't need to write .should('exist') after DOM commands like cy.get(). These commands expect the element to eventually exist in the DOM.

  • @SeibertSwirl
    @SeibertSwirl Před 2 lety

    Good job babe! Lol I forgot you shaved your beard so when you popped up in the corner I was like….👀 who is that 👀🥵

  • @theanswer1993
    @theanswer1993 Před 6 měsíci

    But if you run a test once won't it write Bob to the database? So for every test you write the same thing into the database. How do you clean it before every test?

    • @WebDevCody
      @WebDevCody  Před 6 měsíci

      Why is that an issue if you start with a fresh database before you run your tests? Just create users with unique names each time you run the test or append a random id to the persons name if having too many bobs is an issue

    • @dstutz
      @dstutz Před 5 měsíci

      One approach is to stub the API requests so that you don't even need a database at all to do the testing. Technically that wouldn't be a true "E2E" test anymore since anything you're stubbing is effectively removed from the test, but in theory it should run a lot faster since there's no network latency... plus it allows you to simulate a lot of different API response conditions

  • @dariusbualan9403
    @dariusbualan9403 Před rokem

    Does cypress insert data into the database? If you run the test multiple times will it insert multiple data into the database?

    • @WebDevCody
      @WebDevCody  Před rokem

      It uses your Ui just like your users do, so yes I should

    • @theanswer1993
      @theanswer1993 Před 6 měsíci

      ​@@WebDevCody but isn't that bad?

    • @WebDevCody
      @WebDevCody  Před 6 měsíci +1

      @@theanswer1993 you can just run commands to clean up the data after it’s created. Also often your database should start with a new fresh database with seed data.

    • @aspasiapolitou8115
      @aspasiapolitou8115 Před 6 měsíci

      I had the same question. What commands do we need to add in order to start with a fresh database?

  • @merotuts9819
    @merotuts9819 Před 2 lety

    A video on Playwright please 🙏

    • @WebDevCody
      @WebDevCody  Před 2 lety

      I’ll have to check it out, I’ve never used it

  • @ranvijayupadhyay3987
    @ranvijayupadhyay3987 Před rokem

    Can u share me code today

  • @juliobarber4206
    @juliobarber4206 Před 2 lety

    p̳r̳o̳m̳o̳s̳m̳