Results 1 to 8 of 8
  1. #1

    Custom Image Comparer

    Is there any way/plugin by which i can use my custom image comparer to compare images at checkpoint instead of using the default TestComplete image comparer?
    There are ways of calling dll functions from my test script but what if i write 100s of test, i can't added dll call in every test.

    Thanks in advance...

  2. #2

    Re: Custom Image Comparer

    You can put your custom image comparer in a DLL and load it in TestComplete. Now checkpoints are really just a bit of code like this :

    if ACTUAL = EXPECTED then
    log.message "PASS"
    log.error "FAIL"
    end if

    Anyway my point is, you don't need a special in-built checkpoint. You can code it yourself, and call your custom image comparator from the loaded DLL.


  3. #3

    Re: Custom Image Comparer

    Yah, true that i can write my own code in the test script to call my custom comparer functions and check for the result. But what if i have to write say 500 different test scripts, then i will have to go into every point where i want to do image comparison and insert a call to my custom comparer function which is something i don't think is the right way to do.
    What i am asking about is something like when creating a checkpoint say "region checkpoint", i should be able to choose whether to use default/custom comparer to compare the image. Or something which should let me choose comparer while recording the test.

  4. #4

    Re: Custom Image Comparer

    Or, you can write a script extension to call your code in a check point.
    -Robert Martin
    Automated Testing Evangelists
    TestComplete "expert"
    Definition expert - noun - Unknown drip under pressure

  5. #5
    Senior Member
    Join Date
    Mar 2007
    Waterloo, Ontario, Canada

    Re: Custom Image Comparer

    I'm confused, why does it matter? I mean you'll have to add the checkpoints anyway, right? I DO think the cool factor of using a DLL and script extension would be neat, but I have a custom comparison function within my framework where I don't need to actually insert anything in my script other than the call. Do you not have to call this from the script at all? I think if you have something built into your framework then you should still be ok. That is unless the DLL does something more than the built-in comparer. Then it's totally understandable.
    9 out of 10 people I prove wrong agree that I'm right. The other person is my wife.

  6. #6

    Re: Custom Image Comparer

    Yeah I think the original problem calls for an efficient way of creating test cases in general - a framework. Our test framework allows us to insert checkpoints in huge volumes, and all the user needs to do is enter a small string for each checkpoint, and the framework generates the checkpoint code. Basically our framework is scriptable, combination of VBScript and a custom language.


  7. #7

    Re: Custom Image Comparer

    Hello Atrockz,

    I have registered your request regarding comparing pictures by using an external comparer in our DB.

    [ QUOTE ]

    There are ways of calling dll functions from my test script but what if i write 100s of test, i can't added dll call in every test.

    [/ QUOTE ]
    You can create a function that will compare pictures by using your comparer and call it where needed. To replace the Regions.Compare method with the needed function name, you can use the Replace dialog. Please refer to the "Replace Dialog" help topic for details.
    Best regards,
    David - SmartBear Support

  8. #8

    Re: Custom Image Comparer

    Yah, the original problem calls for an efficient way of creating test cases in general, a framework. Well i almost got it working for my custom comparator using script extension but still got lots to do. BTW its not as easy as inserting a line of code to the script. I have to replicate almost all the actions that region checkpoint does. I have to take a snapshot(image) of application window, save it to Regions and also insert the code to call my custom comparator while recording the test. Also while running the test i have to take care of log file. I need to add the current and diff image to Regions, need to show these images on log file. Add my comparison result to log file and so on.
    I know its not a difficult script to write but the thing is, its already been implemented in Regions Checkpoint and still i have to write everything from scratch. Not forgetting writing script extension and installing it..



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 04:14 PM.

Copyright BetaSoft Inc.