galenframework / galen

Layout and functional testing framework for websites
http://galenframework.com
1.41k stars 161 forks source link

Image comparison failing on different monitors #541

Open dineshk-qa opened 6 years ago

dineshk-qa commented 6 years ago

I have captured some screen shots for desktop, mobile and tab on a particular resolution for each device. When I execute image validation tests, they work fine on my big 2nd monitor screen (the same I used to get the expected images) but when I execute the same set of tests on my laptop they fail stating a massive difference with actual and expected screens/images. Ideally they should pass because the resolution is same. What could be the reason for this?

hypery2k commented 6 years ago
dexster commented 6 years ago

I have the same issue. I took the "expected" screenshots on my second monitor but when the tests run on my retina display they fail. If you look carefully at the attached screenshots you can see the text anti-aliasing is different between expected and actual. There is also a slight vertical shift in pixels

galenframework-cli - 2.3.7 java 1.8.0_162

layout-2-layout-actual layout-3-layout-expected layout-4-layout-map

Planktom commented 5 years ago

@dinesh-domain, I solved the problem on my windows 10 laptop with setting the display scaling to 100% instead of the default 125%