Image-Based Testing With HP UFT’s “Insight” Feature
- October 13, 2014
HP Unified Functional Testing(UFT) introduces a very competitive feature set, having wide support for different technologies:
UFT 11.50 introduces an image based form for automation i.e. Insight. Basically UFT Insight feature uses an image to identify test objects & this is completely integrated into UFT, enhancing the wide range of UFT capabilities like Record, Learn and relations identifiers to name and others.
One problem that every automation engineer faces during automation is that some steps often fail again & again during record & playback, while all others go well. Obviously these few steps make/break the capability to automate the whole applications. That’s why we’ve found the newly introduced Insight feature in UFT 11.50 extremely useful. It solves the problem of failing steps during automated testing especially when you mix ordinary UFT tests with Insight steps; it gives you the best of both worlds.
Insight offers a simple graphical interface. This is a great advantage over other unsupported technologies such as Flash, or even remote desktop connections that use coordinates and GUI of the application’s elements to automate applications.
To explain it in detail with practical implementation, we will use the Windows Calculator as an example. Although we are using the example of simple application Calculator in this blog, this feature will work just as well with complex applications as well.
Remember that UFT gives test objects descriptive names. It doesn’t carry any additional insight into properties of the test objects other than an ‘InsightObject’ description. UFT inserts actual image of the test object into the script, instead of the objects with names like InsightObject_2, InsightObject_3 etc. you can see this in below snapshot as well:
The Insight feature can be activated during a recording session, by changing the recording mode selection to ‘Insight Recording’ as shown below in snapshot:
When insight recording mode is ON, mouse operations will create an insight step, keyboard actions, on the other hand, create WinObject.Type steps. This is due to ordinary coordinates associated with it and UFT tries to understand which object was acted upon, based on coordinates. For example:
Insight object also supports the Type operations. You can use this method in a test to move the focus to a specific ‘InsightObject’ before typing.
We hope you are able to use the Insight feature with HP UFT with ease now. Let us know how your experience turns out in the comments below.