Best practices for working with AI visual comparisons

To learn what you can and cannot do with AI visual comparisons, review the following best practices.

In AI Scriptless, AI-based visual comparisons are available through AI commands. For Appium testing, AI-based validations are available through AI functions.

To have this functionality set up in your cloud, contact your Perfecto account representative. A separate license is required to access this feature.

Limitations

The following limitations apply to AI visual comparisons:

  • The detectable categories are predefined to cover commonly relevant cases. No free-form description of changes to detect is needed.

Do's and don'ts

Do's

All categories will be evaluated in the test results and you can review all detected comparisons. Select only change categories as failure criteria that you want to fail the test.

Don'ts

To make the most out of AI visual comparisons, do not generally choose Device or Pixel Diff as failure categories.

  • Device changes refer to the clock, battery status, network status, and similar.

  • Pixel diff changes are compression artifacts, image scaling artifacts, and similar.

These categories triggers for virtually every test, causing too many test failures. They have been included for the rare cases where the device status or artifacts are specifically what you are testing.

Need help?

If you need help with a complex validation, share it with us—we love a challenge! Reach out to Perfecto Support and include a screenshot with the exact prompt you used and information about what you want to validate or assert.