Forum Discussion
The current compare method doesn't give me enough flexibility other than just ignoring a specific number pixel differences. This method results in many false positives or if tolerance is set it too high it ends up missing actual problems. The compare method is much much faster and must be doing something similar to what I am trying to do so it seems this should be possible.
Do you have any suggestions on alternative tools or other methods that are not "this nested loop deal"?
"The current compare method doesn't give me enough flexibility other than just ignoring a specific number pixel differences. This method results in many false positives or if tolerance is set it too high it ends up missing actual problems."
So I'm guessing from this, you are having to tweak the tolerances to get it to match?
I'm not sure that you're going to get it any better writing one yourself? What are you hoping to put in there that will make a custom version better?
As tristaanogre says, it's going to be slow. The "Compare" method will be faster, I would imagine, primarily due to being written in a much lower level language than a scripted (interpreted) language in the TC IDE. I can't imagine anything scripted will ever match it for speed, no matter how well you write it.
As mentioned above, you could try using something external. Or I had a quick look to see if there were any online API's that do this. And there are. But I didn't find any free ones ....
- tristaanogre9 years agoEsteemed Contributor
Just as an additional note... I find image comparisons to be generally a bad testing methodology for most situations anyways. There are times when it is necessary, especially if you are doing ACTUAL image processing and need to make sure that an image after being processed is correct (like for medical imaging, etc). But doing region or image comparisons for most desktop or web based applications when an object comparison or object property comparison will do... you've already noted the problems of tweaking tolerance and the pitfalls there... as well as it generally being imprecise all around. You are taking a picture and comparing it to another picture and using that to determine whether or not intricate code is being executed properly.
So, while your need as stated is that you want to compare images, I wonder if there is a better way of conducting the test that avoids image comparison all together that would achieve more accurate results and a better feedback as to the state of the AUT.- Colin_McCrae9 years agoCommunity Hero
Yep. 100% in agreement with tristaanogre here.
I use image compares/searches & OCR as last resorts only. And even then, I try and use them only for basic verification purposes. I wouldn't try and do any detailed or intricate tests with it. It's just not reliable enough, no matter how much you fiddle with it.
"Look and Feel" has tended to remain the preserve of manual testing in my place.
But of course, you may not have any choice. :smileyfrustrated:
- AlexKaras9 years agoChampion Level 3
> "Look and Feel" has tended to remain the preserve of manual testing in my place.
I am starting to be afraid that this will be counted as an advertising... but I already mentioned Applitools Eyes (https://applitools.com/) several times here. It is not integrated with TestComplete and VBScript/JScript, but provides (among others) Java and .Net SDKs, so it should not be a big problem to use the SDK from within TestComplete via Java or CLR bridge.
Their functionality still seems to me to be quite interesting and promising one and I played a bit with it from .Net (and TestLeft). Have an idea to use it from within TestComplete test code, but haven't find a time yet to create a code to convert TestComplete's Picture object to .Net Bitmap one. Once I will do this, I certainly will give it a try with some TestComplete's code to add UI layout verification.
Related Content
- 3 months ago
- 10 years ago
Recent Discussions
- 15 hours ago
- 7 days ago
- 10 days ago