#8: Cypress Interception | Spy | Mocking | Stub [Latest 2021]

Sdílet
Vložit
  • čas přidán 21. 08. 2024
  • #cypress #cypressByNaveenAutomationLabs
    In this video, I have explained how to use cypress for intercepting, spy, stubbing and mocking the APIs.
    GIT Repo: github.com/nav...
    ~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    www.youtube.co...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
    t.me/joinchat/...
    Naveen AutomationLabs Paid Courses:
    Java & Selenium:
    naveenautomatio...
    Java & API +POSTMAN + RestAssured + HttpClient:
    naveenautomatio...

Komentáře • 17

  • @Godgodgod203
    @Godgodgod203 Před 2 lety +4

    Practical example shown on stubs and mocking . Very informative

  • @athribharadwaj1066
    @athribharadwaj1066 Před 2 lety +2

    Very neatly explained, this concept was running over my head for a while. Thanks for this video, it was very helpful.

  • @bhanumurthyramala1158
    @bhanumurthyramala1158 Před 2 lety +1

    Thank you Naveen for a presentation which explained the intercept very well. Appreciate more videos.

  • @himanisingh8113
    @himanisingh8113 Před 2 lety +2

    Your videos are really informative, Could you make a video on stubbing promise callbacks ?

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

    Thanks!

  • @pavangowda1418
    @pavangowda1418 Před 3 lety +1

    Hello Naveen, can u make video fr automation testing preparation Wt to study, prerequisites in current trending days

  • @RamyashreeBECOMEAFINISHER

    What is the exact difference between mock and stub?

  • @anupdeshmane8827
    @anupdeshmane8827 Před 2 lety

    hey navin,
    can we catch snackbar using cypress

  • @himanshusethi1
    @himanshusethi1 Před 2 lety

    Can you please make a video on websocket using cypress?

  • @Abdulwahab-zf4yv
    @Abdulwahab-zf4yv Před 3 lety +1

    Hi Naveen, Thanks for this great video How you get the suggestion for cypress commands i know this Triple slash directives. Buy My question is when your write any command for example when you write then function in response its shows suggestion in gray colour.. How you will do that .Thats looks great .can you please tell me ? Are you sing any Vs code extension let me know Thanks in advance

  • @CIAiscorrupt
    @CIAiscorrupt Před 2 lety

    Hey Naveen i keep getting a 'Permission denied to access property "document" on cross-origin object' error when i run the intercept test with static response. Is this because of the API not giving me permissions?

    • @Harjeet-xz4kz
      @Harjeet-xz4kz Před 7 měsíci

      To resolve this, you might need to ensure that the API or server includes the necessary CORS (Cross-Origin Resource Sharing) headers to allow your application to access the response. Additionally, check if your API request is configured correctly and if any authentication or permission issues might be causing the problem.

  • @vjs7283
    @vjs7283 Před 3 lety

    How can we intercept a proxy call ? If I don't use a proxy, I can mock the API call. However, I need to use a proxy to validate the Authorization . Please lead some light on how I can handle it. I am getting HHTP response 404 for the proxy server.

    • @Harjeet-xz4kz
      @Harjeet-xz4kz Před 7 měsíci

      you can intercept a proxy call using the cy.intercept() command. Simply use it to intercept the desired route or URL, then handle the request/response as needed. This allows you to control and manipulate network requests during testing.

  • @muditmaheshwari9188
    @muditmaheshwari9188 Před rokem

    how can we get the output of running command in browser console in cypress

    • @Harjeet-xz4kz
      @Harjeet-xz4kz Před 7 měsíci

      Cypress does not provide a direct way to access the browser console output within the test script