Forum Discussion

deepa_samota's avatar
deepa_samota
Contributor
11 months ago

Image Comparison test script failing when running test cases in Azure pipeline

Image comparison test script working fine when running locally but, when we executing with Azure pipeline it is throwing error (Expected and actual image not matching).

 

 

7 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    If the images are different, then it implies that the other environment is not exactly the same as your local machine, due to resolution/scale/colour etc being different.

    • deepa_samota's avatar
      deepa_samota
      Contributor

      The VM where we are running pipeline ,same VM we have executed and passed only when run in pipeline it is failing.

    • deepa_samota's avatar
      deepa_samota
      Contributor

      We have configured pipeline as mentioned in article. We are facing issue with image comparison test scripts .

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I understand that you are having issues with image comparison, but you haven't stated exactly what the differences are - is it pixel, colour, anti aliasing etc. some sort of screenshot would help.

    • deepa_samota's avatar
      deepa_samota
      Contributor

      Fonts are smaller and may be because of that height of div is different

       

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    As said in my previous statement "If the images are different, then it implies that the other environment is not exactly the same as your local machine"

     

    Capture the images from your environment, and use those as your base line images.

     

    There's going to be subtle differences between a virtual machine and a physical machine, which you might not be able to resolve.