A user can include a computer vision validation step when creating a test case via Architect, noting the initial baseline of the CV test will be created on the first successful run. *This is because the browser the test has been created on may not match what is used during execution. Any image or element in the application under test can be verified using this process.
To Create a CV Validation Using Architect
- Launch Architect to create the test case.
- In this example we will create a visual validation on the image highlighted below, specifically the Alonzo tripod, in the application under test.
- To perform the visual check, activate the ADV toggle, click the verify button then click on the image/element to be verified. This will open the ADV Validation screen in Architect, to allow for the Visual Check.
- Click on the Visual Check button.
- Determine Visual Check Type. There are two (2) types:
- Previous Run - Select this to compare the image/element being verified to the previous execution.
- Step Comparison - Select this to compare the image/element being verified to a previous step in the current test case being built.
For Visual Check Type = Previous Run
- To begin, first verify the image as a step in the test case. To do so, click the verify button in Architect, then click on the image/element. This will create the verify img step (5). See below:
- Select Previous Run from the Visual Check Type drop down.
- Click Continue.
- REMEMBER to then click Save to add the visual check to the test case. *Important to SAVE!!
For Visual Check Type = Step Comparison
- Select Step Comparison from the Visual Check Type drop down. The following fields will display:
Visual Check Type - Select whether the image/element being verified in the visual check should be equal to (Visual Equal - ve) or not equal to (Visual Not Equal To - vne) the image/element being compared to in the previous/selected step.
Step # - Select the Step# being compared.
Variance % - Enter the percent needed to match the image/element being verified.
2. Click Continue then click Save to add the visual check to the test case. *Important to SAVE!
The Computer Vision Validation has now been added to the test case. When the test case is complete, and the test case has been saved, return to the dashboard.
To View/Edit the CV Validation
- Go to the Architected test case where the CV Validation was created. Click Actions >> Details.
- Notice the CV tag on the steps with CV Validation.
- Expand the step to view additional information. See below where Step 6 shows Previous Run validation comparison and Step 7 shows Step Comparison:
*NOTE: Slider View will indicate under the DATA tab that "This action has been verified using Computer Vision validation using a match percentage of 100%", along with a green visual validation box outlining the image/element tagged for CV Validation.
- Click the Actions icon >> Edit Action Log
- Under the Standard Attributes tab, scroll down to the visual_comparison_type and visual_comparison_match.
The visual_comparison_type = previousrun for a Previous Run Visual Check Type and no visual_comparison_match field will be available.
The visual_comparison_type = stepcomparison for a Step Comparison Visual Check Type and note the visual_comparison_match data. In the example below, see specifically the visual_comparison_match data:
Let's expand on the visual_comparison_match field for viewing and editting purposes. As previously referenced above.
vne = Visual Not Equal to
ve = Visual Equal to
*This value comes from Architect during test case creation as shown in this screenshot for reference.
Scroll to the end of the data string and notice the value = 50 (see screenshot below).
*This value come from Architect during test case creation as well, as shown in the screenshot for reference. In this example, a 50% variance was applied. Keep in mind allowing for a 0% variance may cause issues/test failure.
The user can make edits to this CV Validation data in Edit Action Log. When finished, click Save.