Computer vision validation (CV validation) is defined as the process of validating the GUI of the application in a testing environment.
Some examples of computer vision validation are:
A logo on a website
A payment gateway sign
The color of elements on a webpage
Checking to make sure error messages are displayed correctly
Any specific element that is displayed visually on the page
When is CV Validation used?
Computer vision validation is used in cases where the functionality of an element is either not in question or is already being tested. Computer vision is strictly used to ensure all elements are present on the page, it's located where it's supposed to be and is visually consistent with how the element previously looked.
To use Computer vision validation is as simple as writing, specifically, what the user wants to verify visually. Here are a couple of examples that could be used as step steps within the Functionize NLP system.
Verify the logo at the top left corner using computer vision to ensure a visual variance is no greater than 5%.
Verify the header image using computer vision to ensure it is equal to the last image seen on the page.
How to adjust a CV validation using the Action Log:
To adjust a Computer vision validation, or add one, after a test has been modeled, navigate to the specific step to add the validation to. Click the edit button and open the Action Log. Once the Action Log appears, click the Options tab and select Computer Vision Based Validation. Once selected, there will be an option to include a value. Put the percentage value in the Change % Allowed field. For strict validation, use 1% in the provided textbox (the default value is 5%) and make sure the test step has visual check enabled.
Mechanism: after an element has been recorded, the first successful run of that element is treated as the goal standard image and the second as the baseline image. When the test case is executed, the element is compared with the goal standard image and the calculated results.