Visual Testing in Playwright: Ensure UI Consistency | Complete Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.ย. 2024
  • 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

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

  • @mohitchoudhary9008
    @mohitchoudhary9008 22 วันที่ผ่านมา

    Wow neatly explained 🫶🏻

  • @orbita3000
    @orbita3000 5 หลายเดือนก่อน +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 ปีที่แล้ว +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  ปีที่แล้ว

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

  • @ShivamPandey-mw5zh
    @ShivamPandey-mw5zh ปีที่แล้ว +1

    This is awesome. Quite helpful!

  • @meg6pat
    @meg6pat ปีที่แล้ว

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

  • @taras9513
    @taras9513 ปีที่แล้ว

    Thanks, that was really helpful!

  • @Aslan11123
    @Aslan11123 3 หลายเดือนก่อน

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

  • @kumarraj989
    @kumarraj989 3 หลายเดือนก่อน

    Any example with java

  • @filipgajic93
    @filipgajic93 3 หลายเดือนก่อน

    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 !

  • @user-bb1hx3dj8r
    @user-bb1hx3dj8r 3 หลายเดือนก่อน

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

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

    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  8 หลายเดือนก่อน

      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

  • @nameundefinedname5307
    @nameundefinedname5307 ปีที่แล้ว

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

    • @rajdesai94
      @rajdesai94 ปีที่แล้ว

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

  • @sanjuburkule
    @sanjuburkule ปีที่แล้ว

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

    • @CommitQuality
      @CommitQuality  ปีที่แล้ว

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

  • @meg6pat
    @meg6pat ปีที่แล้ว

    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 ปีที่แล้ว

      Applitools Eyes should do the job

    • @CommitQuality
      @CommitQuality  11 หลายเดือนก่อน

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

  • @danielstoicamusic
    @danielstoicamusic 10 หลายเดือนก่อน

    Unfortunately this becomes way more complicated when running in CI.

    • @CommitQuality
      @CommitQuality  10 หลายเดือนก่อน

      I would suggest looking into containers to keep the implementation simple