For the best experience, try the new Microsoft Edge browser recommended by Microsoft (version 87 or above) or switch to another browser � Google Chrome / Firefox / Safari
OK

Smart Visual Testing - Visual Validation Through Automation

Introduction

Visual/UI testing is a quality assurance activity that is meant to verify that UI appears correctly to users. It is basically a validation of screenshots (or specific parts) of your desktop/mobile app/website i.e. the screen looks the way it supposed to, example: elements in the right location, fonts, colors etc. Visual testing comes under regression test which makes sure that screens that were correct have not changed unexpectedly. UI itself seems right to the user and that each UI element looks in the right color, shape, position, and size. We also want to validate that it doesn’t hide or overlap any other UI elements. In fact, many of these kinds of scenarios are so difficult to automate that they end up being manual tests.

UI/Visual Validation Automation

  1. UI Automation allows to test all the elements that appear on a screen with few lines of code.
  2. Visual Automation uses ‘Artificial intelligence powered vision’ provided by tools in the market, one can automatically verify whether web or mobile app appears correctly across all the devices, browsers, and all screen sizes.
  3. Automation supports visual testing in all important browsers of any versions and also gives immediate results on how your app looks in IE, Firefox, Chrome, Safari
  4. It also lets you check the visuals of your app on different types of devices, whether it is mobile phones, tablets, laptops, and desktop.

The need for Visual Validation through Automation

Manual Visual Validation or UI testing utilizes most of the time in SDLC and is error-prone and inconsistent. Also, after finishing the visual validation of the application manually, we end up with below questions

  1. Is Visual Testing done effectively?
  2. How many pages you can manually test and how many times?
    • Each time you update a version?
    • On how many browsers, devices, screen resolution, operating systems, localizations?
    • Are you sure you did not miss anything?

So what happens when we automate the visual validation,

  • We not only save the time but also ensure defect-free software deliverables.
  • Think of such visual Automation that allows you to find and automatically detect all the visual bugs to validate the visual correctness of the application.
  • All we should be requiring is the baseline version of the visuals(screenshots) on every next time we run the Automation Suite, it compares all aspects of the UI i.e. (pixel, fonts, colors, alignments, appearance, layouts, text) with the runtime version of the application and highlights the difference in the UI dashboard.
  • It automatically detects scenarios where variations were caused by a new feature that does not appear in the baseline image and ‘accepting’ the new screenshot so that next time onwards it will be used as the new baseline image for that checkpoint.
  • It also recognizes cases where differences indicate a bug that needs to be fixed, reporting the issue, and ‘rejecting’ the image – meaning that the baseline image is not updated and remains as it is.

Some of the tools in the market that supports visual test automation

  1. Applitools – https://www.applitools.com/
  2. Screener – https://screener.io/
  3. Eggplant – https://eggplant.io/eggplant-functional/

Sample screenshots from Applitools:

Below screenshot is highlighting, the differences in red color ring i.e. between expected and actual screenshot as a part of visual validation via ‘Applitools'-Applitools

Below screenshot is highlighting, the differences in the angular application via Applitools-

Applitools

Integration of Visual Automation tools with any Test Automation Tool

  • It adds a great flexibility post integration with any existing test automation tools in the market like ‘Selenium’,’QTP’ etc.
  • Integration helps in assessing build-specific visual UI test results and manage baselines directly from CI tools like Jenkins, TeamCity etc. Open issues logged in any defect tracking tool directly from the test manager and send messages automatically when tests fail.
  • Programmatically fetch test results, build your own reports or upload them to your favorite test manager.
  • Integration helps in scenarios like, whenever any code is committed by a developer for any code refactoring or to defect fix, the artificial intelligence system of tools (Analysed through Applitools) comes into play. It auto-generates test cases by relating information with test suites. It calculates the changes done in files and triggers the scheduler to run the test cases.

Below screen explains, how visual validation can be automated by integrating ‘Applitools’ with ‘Selenium Test NG’ Framework-

Integration of visual tools

Below screen explains, how visual validation can be automated using any programming language-

Integration of tools

Conclusion:

Visual aspects of an application are like the face of the application by which we determine whether to use or not. Effective visual testing is very important from the software deliverables perspective. By integrating and automating the visual features of the application to the existing Automation Test Framework helps in diminishing the chance of any missing UI defect since no human intervention involved also will give better ROI along with quality.

References:

  1. https://applitools.com/features
  2. https://applitools.com/
  3. https://google.com/

Get Started

Your Information

13 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Your Information

15 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Your Information

1 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.
Globally Presence
Across Americas, Europe, and Asia
All Locations
Asia
Europe
North America
19 Locations
7
10
2
10 Locations
Ahmedabad
A-201, WestGate Business Bay, SG Road, Makarba, Ahmedabad 380015
Hyderabad
Block –B, Wing 1, 2nd Floor, Cyber Gateway, Hitech city, Hyderabad 500081
Gurugram
2nd Floor, Tower B, Unitech Cyber Park, Sector 39, Gurugram 122001
Singapore
70 Shenton Way, #13-03, Eon Shenton, Singapore 079118
Bengaluru
Subramanya Arcade SA Tower, 2nd floor, A-wing, Bannerghatta Main Road, BTM Layout, Bengaluru, Karnataka 560029
Chennai
8th Floor, Smartworks, Olympia National Tower, Block 3, A3 and A4, North Phase, Guindy Industrial Estate, Chennai 600032
Pune
7th Floor, IT-7 Building, Qubix Business Park Pvt. Ltd. SEZ, Phase - 1, Hinjawadi, Pune 411057
Mumbai - Thane
AWFIS 1st Floor, Nehru Nagar, Wagle Industrial Estate, Thane West, Thane Maharashtra 400604
Mumbai
7th Floor, Smartworks, Times Square, Tower C, Andheri Kurla Road, Marol, Andheri East, Mumbai 400059
Pune
6th Floor, Smartworks, Pan Card Club Road, Baner, Pune 411045
2 Locations
London
c/o SPACES, 12 Hammersmith Grove, London W67AP, UK
Ireland
Grove, Fethard, Co. Tipperary, E91 E282, Dublin, Ireland
7 Locations
Canada
55 York Street, Suite 401 Toronto, ON, Canada M5J 1R7
Mexico
Tomas A. Edison 1510-201 Ciudad Juárez, Chihuahua, Mexico 32300
Seattle
4030 Lake Wash Blvd NE, STE 210, Kirkland, WA 98033
Troy
6915 Rochester Road Suite 300 Troy, MI 48085
Sunnyvale
1248 Reamwood Avenue Sunnyvale, CA 94089
New Jersey
343 Thornall Street Suite 720 Edison, NJ 08837
Dallas
5851 Legacy Circle Suite 600 Plano, TX 75024
All Locations
19 Locations
7
10
2
10 Locations
Ahmedabad
A-201, WestGate Business Bay, SG Road, Makarba, Ahmedabad 380015
Hyderabad
Block –B, Wing 1, 2nd Floor, Cyber Gateway, Hitech city, Hyderabad 500081
Gurugram
2nd Floor, Tower B, Unitech Cyber Park, Sector 39, Gurugram 122001
Singapore
70 Shenton Way, #13-03, Eon Shenton, Singapore 079118
Bengaluru
Subramanya Arcade SA Tower, 2nd floor, A-wing, Bannerghatta Main Road, BTM Layout, Bengaluru, Karnataka 560029
Chennai
8th Floor, Smartworks, Olympia National Tower, Block 3, A3 and A4, North Phase, Guindy Industrial Estate, Chennai 600032
Pune
7th Floor, IT-7 Building, Qubix Business Park Pvt. Ltd. SEZ, Phase - 1, Hinjawadi, Pune 411057
Mumbai - Thane
AWFIS 1st Floor, Nehru Nagar, Wagle Industrial Estate, Thane West, Thane Maharashtra 400604
Mumbai
7th Floor, Smartworks, Times Square, Tower C, Andheri Kurla Road, Marol, Andheri East, Mumbai 400059
Pune
6th Floor, Smartworks, Pan Card Club Road, Baner, Pune 411045
2 Locations
London
c/o SPACES, 12 Hammersmith Grove, London W67AP, UK
Ireland
Grove, Fethard, Co. Tipperary, E91 E282, Dublin, Ireland
7 Locations
Canada
55 York Street, Suite 401 Toronto, ON, Canada M5J 1R7
Mexico
Tomas A. Edison 1510-201 Ciudad Juárez, Chihuahua, Mexico 32300
Seattle
4030 Lake Wash Blvd NE, STE 210, Kirkland, WA 98033
Troy
6915 Rochester Road Suite 300 Troy, MI 48085
Sunnyvale
1248 Reamwood Avenue Sunnyvale, CA 94089
New Jersey
343 Thornall Street Suite 720 Edison, NJ 08837
Dallas
5851 Legacy Circle Suite 600 Plano, TX 75024