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 validation 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 what the user wants to verify visually. Examples of this could include:
- 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 Add (or Adjust) a CV Validation Using Action Log:
To add or adjust a computer vision validation after a test has been created, navigate to the specific step in question.
- Go to any Project>>Test Case
- Click on the Actions button on any test case and select Details.
- Click on the screenshot preview of any step of the test case.
- Click the Edit button in the lower right and select Edit Action Log.
- Once the Action Log appears, click the Settings tab.
- 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. NOTE: 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.