Saturday, December 13, 2014

Search Property and Filter property

Visiting the Search and Filter properties of Coded UI once more. This time with some further insight and understanding of them.
Each object has some search properties associated with it. Along with this, if the object’s Technology is Web then it also has Filter properties associated with it. Coded UI uses these properties to identify the objects at runtime. Performance and functionality of your coded UI test can be affected by how you use those property types.
Search Properties are checked first. So the more search properties you have listed, the longer it will take the test to locate the specific object. Then the filter properties are tested against the objects found by the search to locate the exact object needed.

During the Playback, Coded UI first searches for the object having all the specified search properties using ‘AND’ and then one by one it searches with filter properties using ‘OR’ and returns the resultant UI Object.Search, then the first object satisfying the search would be returned.

Best Practices in Object Identification for Performance Improvement

  • Make the unique property as the ‘Search property’ of the object. And remove other Search and Filter properties.
  • If there are some properties in ‘Filter Property’ which can help in identifying the object uniquely, make that property as a ‘Search Property’.
  • Make prudent use of Search and Filter properties and Disable the Smart Match Identification.

Conclusion

Coded UI uses Search and Filter properties of an object for identifying it during the Playback.
Prudent use of these properties can improve the Coded UI performance and make the test automation stable for future.

No comments:

Post a Comment