Forum Discussion

mfrey's avatar
mfrey
New Contributor
14 years ago

How to do screenshot testing?

I have a large application. My idea is to go throu the app manually recorded by TestComplete and make screenshots everywhere. After a update the same procedure should happens automatically. Then TestComplete should show where are differences between the screenshots so i can see within seconds if are only at the right place (sometimes only at the splash-screen with versionnumber)

How can i do this.

6 Replies

  • Hi Matthias,


    It looks like you are talking about a new TestComplete 8 feature - the improved Test Visualizer. You can learn more about the Test Visualizer here.


    I hope this helps.

  • mfrey's avatar
    mfrey
    New Contributor
    Hello,



    thanks for your sugestion. I read all topic to Test Visualizer.



    After recording and playback with a new version how can i find all different screenshots?

    When i look at http://www.automatedqa.com/support/viewarticle.aspx?aid=12275 there are no errors or warnings even though screenshots are different.

    We have over 400 forms in our application. It's impossible for us to check all screenshots manually in every new version.



    What can we do?



    Matthias
  • Hi Matthias,



    Test Visualizer has no abilities to report the difference between expected and actual pictures automatically. The only way to compare images is manually clicking Comparison Mode on the Actual Image toolbar (see the Comparing Recorded and Playback Images help topic).



    To report the difference between baseline and actual pictures automatically, you can use region checkpoints. See the Region Checkpoints help topic.
  • mfrey's avatar
    mfrey
    New Contributor
    Thanks Allan,



    am i right that with "Region Checkpoints" i can not only checks regios but a whole window too?



    I think i have to place a region checkpoint for each window/image i have to test.



    To place 400 till 5000 checkpoints manually is not practicable ;-)

    Can i do this automatically. Maybe this a possible way:

    - record the app with screnshots

    - convert the project in a script

    - save the script into a textfile

    - in the textfile add region checkpoints with source automatically with a small tool by me

    - reimport the textfile in the script

    Then i can run the test and get a error in the log for each image that does not fit



    Is this possible?



    Matthias
  • Hi,


    Unfortunately, it is not possible to perform this scenario in TestComplete. You can either add region checkpoints in the places you suppose to have visual difference or generate actual and expected pictures automatically using Visualizer and manually compare the pictures.


    Sorry for the inconvenience.

  • Hello Matthias,



    I think what you need to do is to create screen capture for each dialog of you application then

    save the image in Stores.Regions.  Just make sure to create a naming convention for your reference

    images so that during execution, you'll know to which image the current dialog will be compared to.



    Next is for you to create a function that will get the image capture of the current dialog of your application

    and get the corresponding reference image from Stores.Regions based on the current dialog.  Then will compare

    the two images and report the result.



    Finally, create a script that will start your application that you will be testing, loop until all dialogs of the application

    is opened sequentially.  Then for each opened dialog, call the function for comparing images created earlier.



    I hope this helps.



    Regards,

    Ruel