Object Map Management

Ask general questions here.
atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Object Map Management

Post by atom » Thu Mar 25, 2010 10:50 am

Hiya,

This is a general question to you all... about best practice to maintain your object map / repository
Say for example for v1.0 of your AUT you create an object map
Now for v2.0 you want to validate your object map, and perform any necessary changes
How do you guys do that?

To me the only reasonable way is to execute all tests, and see which ones fail due to not finding a control
But has anyone implemented anything different from this?

Cheers

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Object Map Management

Post by Ciege » Thu Mar 25, 2010 3:51 pm

As I am sure you have gathered from many of my past posts I do not rely on an object map of any kind. I search for and validate all of my objects at runtime. With my code each time I have to interact with an object I pass the search off to a specific search method the looks for the object as a descendant of whatever parent object I want (parent form, parent container, parent list, etc...). Then if my search fails it will return a failure to my caller method and fail the script (unless I set a bit that the search is expected to fail).
The searcher method can be extended easily to return a list of current descendant objects on an unexpected failure and either log them so I can review them later or do some fuzzy logic to see if the object has indeed changed for some unexpected reason.
For the most part I am involved in GUI changes with the dev team and product development so I am aware before hand when things are expected to change and I can prepare for the upcoming failures.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: Object Map Management

Post by atom » Thu Mar 25, 2010 6:12 pm

Hmm... your GUI must be nice :-)
So in your code for example, a test wants to enter some text in a textbox
You search the form and find all text boxes, then how do you identify which one to enter the text in?

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Object Map Management

Post by Ciege » Fri Mar 26, 2010 4:17 pm

Well our GUI is relatively stable. But I have had long conversations with the development team about automation best practices and what they can do to help me which in turn helps them. But having them follow some guidelines when developing or making changes we are able to limit their impact on my code.

However, the way that I am structured is that all of my framework methods do all the heavy lifting. My actual test code for each individual test is usually pretty small and compact. Only doing little bits of work and handing the rest off to the framework. The tests themselves just make reference to the form I am working on and the name of the object(s) I want to deal with. So I don't (as you put it) search for *all* the text boxes, but only the text box that I want to deal with, be it by name or location (i.e. within a specific tab page or container) or by some other combination of identifiers. granted if something does change in my AUT I have to visit each test that makes reference to that name but that is generally pretty easy in VS using a search pattern to find my references.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

atom
Posts: 357
Joined: Sun Dec 07, 2008 11:14 pm
Location: Dublin, Ireland

Re: Object Map Management

Post by atom » Fri Mar 26, 2010 4:37 pm

Okey doke, thanks for input !