Visual Testing in Playwright: Ensure UI Consistency | Complete Tutorial

Поділитися
Вставка
  • Опубліковано 3 чер 2023
  • Welcome to our comprehensive tutorial on Visual Regression Testing in Playwright! In this in-depth video, we'll delve into the world of visual regression testing and explore how Playwright can help you ensure UI consistency across your web applications.
    Visual regression testing plays a critical role in verifying that visual elements of a web page remain consistent after code changes or updates. In this tutorial, we'll guide you through the process of setting up and executing visual regression tests using Playwright, a powerful browser automation tool.
    Practice Test Automation: commitquality.com
    Twitter: / commitquality

КОМЕНТАРІ • 22

  • @taras9513
    @taras9513 11 місяців тому

    Thanks, that was really helpful!

  • @ShivamPandey-mw5zh
    @ShivamPandey-mw5zh 11 місяців тому +1

    This is awesome. Quite helpful!

  • @orbita3000
    @orbita3000 4 місяці тому +1

    i need to do visual testing for hundreds of pages, it would be difficult to tailor mask for dynamic content to each page manually. is there any magic generic solution to mask every element that moves on page, to get a stable test?

  • @maneeshm2427
    @maneeshm2427 11 місяців тому +1

    Nice informative video covering all different scenario's/possibilities. Can you also include how to run the snapshot tests using docker image?

    • @CommitQuality
      @CommitQuality  11 місяців тому

      Yes, great suggestion, I will create a video for this. Thanks :)

  • @meg6pat
    @meg6pat 11 місяців тому

    Also want to mention clip function, then you need specific part of the page which cannot be covered by single locator.

  • @filipgajic93
    @filipgajic93 Місяць тому

    Hi, can this be implemented on other layers or only at test() ? I'm trying to implement this in a base class where I keep all my functions so I can call it on other pages, not to duplicate in all of the tests but I'm getting Unresolved function or method toHaveScreenshot() -> any idea why and how to resolve this ? Thanks !

  • @Aslan11123
    @Aslan11123 Місяць тому

    I only got masked names from ID 5 to 11, even though I did set fullPage to true.

  • @user-bb1hx3dj8r
    @user-bb1hx3dj8r 2 місяці тому

    can you show me how to make it popup the localhost page when you run the test?

  • @meg6pat
    @meg6pat 11 місяців тому

    Question: what are AI visual comarison tools you would sugest to use?
    I hate then 1 pixel line is missing from screenshot which leads to several thousands pixel difference.

    • @Shizostereo
      @Shizostereo 10 місяців тому

      Applitools Eyes should do the job

    • @CommitQuality
      @CommitQuality  10 місяців тому

      Browserstacks Percy is good, however there are lots of options available and I would definitely suggest free trials

  • @nameundefinedname5307
    @nameundefinedname5307 Рік тому

    how do you take screen shots and compare say a test environment with a live environment?

    • @rajdesai94
      @rajdesai94 11 місяців тому

      maybe take both screenshots through navigation to the respective URLs but compare both results to each other's saved screens as well?

  • @muhammadnauman4468
    @muhammadnauman4468 7 місяців тому

    Question: I have 3 visual testing test ( one for desktop , tablet and mobile each) that is written in a same file. As i have use your approach while executing e.g project= tablet for tablet test case , project= iphone for mobile test case . how can i run all the test at once. Please advise

    • @CommitQuality
      @CommitQuality  6 місяців тому

      If you have 3 projects and you want to run them all don't specify a project via your execution and that will be default run all projects in your playwright config file

  • @sanjuburkule
    @sanjuburkule 11 місяців тому

    If a text is going outside of a button in certain screen sizes, can playright automatically detect it?

    • @CommitQuality
      @CommitQuality  11 місяців тому

      If you have the golden image to compare against then yes it will detect something has changed and highlight the pixels that have changed

  • @kumarraj989
    @kumarraj989 Місяць тому

    Any example with java

  • @danielstoicamusic
    @danielstoicamusic 9 місяців тому

    Unfortunately this becomes way more complicated when running in CI.

    • @CommitQuality
      @CommitQuality  9 місяців тому

      I would suggest looking into containers to keep the implementation simple