Visual QA Testing using OpKey
Published: 2021-02-22 06:32:54

<B>What is Visual QA Testing?</B>

Visual <a href="https://www.opkey.com/oracle">QA Testing</a> can be described as the process of inspecting the user interface of a web application and ensuring it is presented as required. The main objective of the Visual QA Testing is to find visual errors like misalignment of objects, layout, font, etc. Visual QA Testing helps user to verify the web content (charts, graphs, dashboards, etc.) on a web page, which makes it worthwhile for a website having high graphical functionality.

<B>Visual QA Testing using OpKey:</B>

OpKey is now capable of testing & analyzing visual quality of the websites. It has now been integrated with few Visual QA specific keywords which help in automated testing of look & feel of responsive websites & different browser sizes. You just need to define your own tags for devices and sizes while using these keywords to write checks for each element on a page.

<B>Visual Testing specific OpKey keywords are as follows:</B>

(1) VisualCheckPointSetting (Used to set prerequisites for visual QA)

(2) VisualCheckPointForObjects (Used to create and compare different layout among objects)

(3) VisualCheckPointForPage (Used to compare the page image by breaking image into given numbers of rows and columns)

Now, you can use these keywords in Test Case in OpKey. Before using these <a href="https://www.opkey.com">OpKey</a> keywords you must ensure that you have fetched all the required objects of the web application to be tested. Now, you can create a Test Case by using these keywords and provide required object/data input argument.

<B>1. VisualCheckPointSetting</B>

This keyword is used to set prerequisites for visual QA. It doesn’t take any object input argument but it takes some data input arguments as described below.

<B>Data Input Arguments:</B>SpecFileName – Provide the name of File to be created with .spec file extension. It will also create a Folder with the same name which will contain all the fetched objects in objects sub-folder. It also contains a full web page image within pageimages sub-folder.

<B>SpecFolderPath</B> – Create a new folder and provide the folder path.

<B>Platform</B> – Provide platform name for which you are performing test such as Desktop, Mobile or Tablet.

<B>Approximation Range</B> – Provide the range of visual checkpoints which can be ignored. Beyond the approximation range, they will be considered as errors (bugs).

<B>2. VisualCheckPointForObjects</B>

This keyword is used to create and compare different layout among objects. It takes up to 10 objects input arguments. It also takes some data input arguments as described below.

<B>Data Input Arguments:</B>

<B>SpecName </B>– Provide the SpecName which collect information about the fetched objects within the created SpecFile.

<B>SpecFolderPath</B>– Provide path of the created folder. It is optional; if you don’t provide SpecFolderPath, it takes path of the folder given with earlier keyword, VisualCheckPointSetting.

<B>3. VisualCheckPointForPage</B>

This is Sikuli plugin keyword which is used to compare the page image by breaking an image into given numbers of rows and columns. It doesn’t take any objects input arguments. It also takes some data input arguments as described below.

First up, it fetches a full image of the web page and saves it. At runtime, it fetches web images and break as per given rows and columns and then compares these images one by one with the earlier fetched image.

<B>Data Input Arguments:</B>

<B>ImageName</B> – Provide the name of image to be created.

<B>ShouldOverlay</B> – Provide Yes/No. Yes: Checked; No: Unchecked

If Yes then both compared images will overlay each other, if No then compared images will not overlay each other.

<B>NumberofRows</B> – Provide the no of rows into which image has to be broken

<B>NumberofColumns</B> – Provide the no of columns into which image has to be broken

For details about Visual QA Testing, kindly refer <a href="https://www.opkey.com">OpKey</a> Help section: Visual QA Testing in OpKey