Forum

Forum
Handle multiple vie...
 
Notifications
Clear all

[Solved] Handle multiple viewports for mobile for visual testing

Anonymous
 Anonymous
New Member Guest
Joined: 2 months ago
Posts: 1
Topic starter  

I have a baseline established for an iPhone device & running the same test on 5 separate devices. Due to the difference in viewport, the test is failing on other devices. Is there a parameter that automatically adjust to different viewport or do I need different baseline for different viewports?


   
admin
Member Admin
Joined: 2 years ago
Posts: 91
 

Yes, you can handle this scenario for your visual testing in Imagium.

Before proceeding to a solution, lets understand how Imagium works. In Imagium any snapshot inside a project is uniquely identified with Test Name and Step Name. Playing around with them gives you flexibility to deal with other similar scenarios.

 

  • If you would like all devices to be run under same Test, then do the following minor framework tweaks:
    • Create the Step Name at run time depending on the device.
      • e.g. Login-Pixel6, Login-iPhone7, Login-SSG21  etc.
      • Imagium will automatically create the required baselines when you run them first time
      • Imagium will automatically compare the respective devices upon subsequent runs matching the step names