Problem with Image Validation - iPad 9,6" and iPad Pro with 11"

Ask general questions here.
BlindJones
Posts: 38
Joined: Fri May 17, 2019 7:10 am

Problem with Image Validation - iPad 9,6" and iPad Pro with 11"

Post by BlindJones » Wed Apr 08, 2020 5:53 am

Hello to all of you,

my have a large Ranorex solution for testing an iOS-App. Very much of the testcases use image validation to check everything works well.
I created the whole solution by using an iPad Pro with a 11" display.

Now we tried running the solution at an smaller iPad Air 2 with a 9,6" display and every image validation step fails.

Can someone tell me on how to resolve this matter without having to change all image validation steps with new screenshots from the smaller iPad? In reverse, the solution will not run properly on the big iPad anymore, I believe...

Any suggestions?

Thank you for the help.

Kind regards
BlindJones

User avatar
RobinHood42
Posts: 324
Joined: Fri Jan 09, 2015 3:24 pm

Re: Problem with Image Validation - iPad 9,6" and iPad Pro with 11"

Post by RobinHood42 » Wed Apr 08, 2020 7:40 am

Hi,

The image are not the same, so the validation fails. You would need to create a separate test for your 9,6" device.

Cheers,
Robin

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6163
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Problem with Image Validation - iPad 9,6" and iPad Pro with 11"

Post by odklizec » Wed Apr 08, 2020 7:57 am

Hi,

Agree with Robin. Because both iPads does not have the same resolution and there is no way to change the resolution on iPads, you will have to use two sets of images. To be quite honest, using image validation in TA is a very bad idea and you should use it only in cases, when there is really no other way to validate something. I would definitely not use it as a major validation tool. It may sound like a fast and easy shortcut, but in the end it turns out to be a nightmare to maintain in a long term use.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

BlindJones
Posts: 38
Joined: Fri May 17, 2019 7:10 am

Re: Problem with Image Validation - iPad 9,6" and iPad Pro with 11"

Post by BlindJones » Wed Apr 08, 2020 11:12 am

Hi,

thank you for the answers.

So do I get that right? It is the best in general to avoid image comparison at all?

I will overwork the solution and try to use more Exist and Visibility validations.

Kind regards
BlindJones

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6163
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Problem with Image Validation - iPad 9,6" and iPad Pro with 11"

Post by odklizec » Wed Apr 08, 2020 11:29 am

Hi,

Definitely. In my opinion, it's always best to validate as much of UI as possible, via UI attributes, instead of image validation. Image validation is simply not as precise and very hard to maintain.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

BlindJones
Posts: 38
Joined: Fri May 17, 2019 7:10 am

Re: Problem with Image Validation - iPad 9,6" and iPad Pro with 11"

Post by BlindJones » Thu Apr 09, 2020 5:21 am

Thank you, odklizec.

Do you know any way to analyze in which test cases are image validations in the solution? Can I generate a list or something in Ranorex?

Thank you very much.

Kind regards
Sebastian

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 6163
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Problem with Image Validation - iPad 9,6" and iPad Pro with 11"

Post by odklizec » Thu Apr 09, 2020 7:06 am

Hi,

I'm afraid, there is no such feature in Ranorex. You will either have to manually go through the scenarios, or you can search the usage of image validation method in individual modules (via Search&Replace dialog).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration