Learn more about Test Studio here
Telerik Test Studio got out of box feature to automate test for image verification. You can verify, whether image has been changed or distorted in application without writing any script. In this post we will take a look on, “How can image verification test can be automated in Test Studio”
Let us consider that there is web application with an image as below,
To do verification around this image, start recording the test. Once application is launched for recording, select Enable or Disable over hover option from Test Studio control panel docked in recording browser window,
This will allow you to select image on DOM. Put mouse for some time and you will get a blue bubble.
On clicking of blue bubble you will get option to Image Verification.
Next you need to click on Image Verification. On clicking you will get Image Verification dialog box.
In dialog box you can configure various options like,
- Verify entire image
- Verify certain area of image
To do exact match you need to put Total Difference as 0. Recommended is to put in between 1 to 5 %. If you want to verify certain area of image then uncheck Verify Entire Image checkbox and configure X axis, Y axis, Width and Height value.
I have recorded a very simple test for image verification with two steps as below. You can see that error tolerance has been set to 2%.
Assume if test fails in image verification step then you will get information as below that Images are not the same.
We just learnt that Test Studio allows us to perform automation of image verification without writing any script. I hope you find this post useful. Thanks for reading.