On Fri, 30 Aug 2024 17:40:01 GMT, Alisen Chung <ach...@openjdk.org> wrote:

>> Tolerance is required when we are going with screen capture comparison since 
>> I see slight change in intensity of colors in captured image, not really 
>> sure of what might be the exact cause for it on some machines/some test 
>> runs. Also I've seen some tests considers this tolerance while testing. I 
>> confirmed it by decoding the pixel color of captured image (Below image). 
>> Coming to false positives, yes this is the trade off when the test is made 
>> automatic. I see no other way to confirm the check mark with captured image. 
>> Other option left is to make the test manual one, yet I feel this way is 
>> better than manual. I've captured several runs without the fix where the 
>> captured area will be just white background and with fix when checkmark is 
>> drawn on UI scale of 2.0 it is drawn inside the area without any other 
>> interference which might have led to false positive.
>> 
>> <img width="20" alt="image" 
>> src="https://github.com/user-attachments/assets/e84da671-0a6f-4871-a83c-0e134cd1d800";>
>
> One more thing, how did you arrive to this number as the tolerance? I assume 
> that maybe other tests also set tolerance as 10?

Yes, referenced from other test.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/20723#discussion_r1740320000

Reply via email to