cancel
Showing results for 
Search instead for 
Did you mean: 

Updated: Visual Testing steps in TestComplete ?

Highlighted
Frequent Contributor

Updated: Visual Testing steps in TestComplete ?

Visual testing bugs are valued these days, how to go visual testing to capture the bugs. Can you share your suggestions or steps for the same ?

Example:

 

The Logo in a website is validated with the HTML tag Associated but how to check if the logo has changed.02.jpg

 

03.jpg

 

With Regards
Vallalarasu Pandiyan | LinkedIn |Vallalarasu.p@gmail.com
11 REPLIES 11
Community Hero

Re: Visual Testing steps in TestComplete ?

What do you mean by "visual testing bugs"?  Can you be more specific as to what you're trying to do, like give an example?


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Community Hero

Re: Visual Testing steps in TestComplete ?

You're talking about Region checkpoints or image comparisons.  That's how I would go about doing it.

https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/regions/about.html


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Frequent Contributor

Re: Visual Testing steps in TestComplete ?

How can we use Visualizer or NameMapping stored images to compare if there is any changes on the go, Instead of regions/stores ?

 

 

With Regards
Vallalarasu Pandiyan | LinkedIn |Vallalarasu.p@gmail.com
Community Hero

Re: Visual Testing steps in TestComplete ?

Hi,

 

> How can we use Visualizer or NameMapping stored images to compare

No way. Those images are provided for your convenience only and cannot be used from within your test code.

You have two options:

a) Use Stores/screenshots comparison as suggested by Robert; or

b) Use some third-party service (like Applitools, for example).

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Frequent Contributor

Re: Visual Testing steps in TestComplete ?

For Visual Testing, We have to compare the images on the go. 

 

In Testcomplete,

1) if we are using visualizer to capture the images

2) No selecting the checkbox for  "Auto Update Frames"

3) Capture Images are activated.

 

Scenario,

If the system 1 with Resolution 1 (Y x Z) in which the Code is created. 

In System 2 with Resolution 2 ( A x B) if we are executing the code for eg: Click a button. 

 

The Excution fails due to image capture is not matching.

 

So, Do we have a possibility to an improved feature to activate the Visual testing

 

1) Adding Regions, Every Object image need to be added (tedious process)

2) Adding third pary (Appi tools) is expensive.

 

Instead if we can use 

https://support.smartbear.com/testcomplete/docs/reference/program-objects/picture/difference.html

 

The following method can be used for visual testing. 

PictureObj.Difference(PictureTransparentPixelToleranceMouseColorToleranceMask)

 

Instead of Picture  loading an external file, If we have a method to refere to Visualization .

 

Visual testing can be achieved using testcomplete.

 

Just a thought. Please throw the possibilities and correct me if i'm wrong.

 

 

 

With Regards
Vallalarasu Pandiyan | LinkedIn |Vallalarasu.p@gmail.com
Frequent Contributor

Re: Visual Testing steps in TestComplete ?

@TanyaGorbunova , @shankar_r  - Can you comment please ?

With Regards
Vallalarasu Pandiyan | LinkedIn |Vallalarasu.p@gmail.com
Frequent Contributor

Re: Visual Testing steps in TestComplete ?

If we have another function similar to

Current: 

w = Sys.Desktop.ActiveWindow().Picture(20, 20, 50, 50);
Regions.AddPicture(w, "MyFile.bmp");

 

New Feature:

w = NameMapping.Sys.QRBrowser.LoginPage.buttonLogIn.Picture()

Regions.AddPicture(w,"LoginButton.Jpg");

With Regards
Vallalarasu Pandiyan | LinkedIn |Vallalarasu.p@gmail.com
Community Hero

Re: Visual Testing steps in TestComplete ?

Yes, you can use the Picture.Difference method... that's what I meant by image comparison.  However, the initial "PictureObj" in your example STILL needs to be something gathered from the automation in order to do the comparison and, on the fly in the code, you can't grab the images from the Visualizer or from the NameMapping repository.  Those images are not available at runtime.

But... that doesn't really seem to be the problem... you mention something about a difference in resolution causing a click to fail.  That has nothing to do with image capture... that has to do with how you are coding your clicks and how you are constructing your tests.  

 

First of all, you should ALWAYS try to make sure your dev environment and your execution environment match as much as possible.

Secondly, you should avoid, as much as possible, any code execution which requires a hard-coded pixel screen location.  

 

So... it seems that you're conflating problems here... you're trying to solve a "unable to click" problem with something to do with image capture.  

It would be helpful if, for those two scenarios, you give us some code example of what you're attempting.  Perhaps we can resolve your problem without having to go through image processing.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
Frequent Contributor

Re: Visual Testing steps in TestComplete ?

Sorry for getting deviated from my question with the example.

 

I'm looking for a feature in which the Images are also stored with object properites (NameMapping).

In execution, As we compare Object Properties and Perform methods on it. Similarly, We can verify the Images too.

 

Yes, We can do that currently by adding all the Images on Regions and Compare on Run time.

 

Instead, Like Expected Object Properties like IdStr, Object Type are stored in NameMapping.

Expected Image can also be stored during first capture in NameMapping. 

 

A Comparision method for Images can be created based on Every Object without manually adding Images to regions. 

 

In a Simple Way, If Images can be added to regions/NameMapping/ Visualizer using Object properties.  

Image Checkpoint or Image Comparision can happen for every step without creating a seperate feature.

 

Option for Image validation on object level can be create for successful Visual validation.

 

ExpectedImage = Namemapping.Sys.Myapplication.LoginButton.StoredImage

Method : StoredImage

ActualImage = NameMapping.Sys.Application.LoginButton.RuntimeImage 

Method:RunTimeImage 

 

If ExpectedImage = ActualImage , Visual Validation will be sucessful.

 

Summary.

Storing Images in Regions on Object level

Comparing Images with Object Level 

 

Finding an Alternative for applitools within TestComplete by creating few new methods.

 

Sorry, If my explaination was not clear.

 

Thanks for everyone who responded.

 

 

 

 

With Regards
Vallalarasu Pandiyan | LinkedIn |Vallalarasu.p@gmail.com
New Here?
Join us and watch the welcome video:
API Testing Mistake #2
APITestingMistake#2