cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to have object repository

SOLVED
Highlighted
Frequent Contributor

What is the best way to have object repository

we have about 12k objects in our application. right now we have those in excel and everytime execute it take2 min to load it. 

it is in DDT driver. So it is not opened but to loading it takes longer time.

we have edit 51 to edit 1 as object name in each screen. we cant give a common name because if 1 extra object is added or deleted in screen changes then we need to change all scripts.

 

right now for objects  edit 51 to edit 1  we are giving name for each screen. that is the reason # of objects in excel are growing.

is there a way we can handle ti much easier way?

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Hero

Re: What is the best way to have object repository

Yes.

NameMapping.

 

There, done. :-)

In other words... why have an external object repository when TestComplete has one built in?  There is no "loading" delay.. it's always there.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

Community Hero

Re: What is the best way to have object repository

You should not use "MappedName" to find, either.  That's the name of the mapped object... if it's already mapped, there's no need to find it.  

And no, that is not your Alias name... an Alias starts with Aliases.

A find should use non-TestComplete designators (wndCaption, ObjectType, etc) for the search.  

So, since you already have it mapped with something represented by field, you should find the Alias designation and then use something like

 

w=Aliases.legaclt.wndLSPANEL3.page32770.WaitAliasChild(field, 30000)

 


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

18 REPLIES 18
Community Hero

Re: What is the best way to have object repository

Yes.

NameMapping.

 

There, done. :-)

In other words... why have an external object repository when TestComplete has one built in?  There is no "loading" delay.. it's always there.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

Community Hero

Re: What is the best way to have object repository

Frequent Contributor

Re: What is the best way to have object repository

So can we add 12000 objects to name mapping?

Community Hero

Re: What is the best way to have object repository

Yes.  There is no limit that I know of as to how many objects you can map.  


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Frequent Contributor

Re: What is the best way to have object repository

i updated the script to Name mapping. But with the name mapping i see slowness in finding the objects on the window popup which was faster when we were using DDT(External repositary). In my find function i used findallchildren method. i have not checked extended find child. when executing it is taking 3 times slower than other. is there any other setup we need to perform to improve.

Community Hero

Re: What is the best way to have object repository

Well, when you are searching for a child object, do you really want "all"?  It's searching everything when you're likely looking for something specific.  Try using FindChild with more specific search criteria.  

Community Hero

Re: What is the best way to have object repository

When you did the name mapping, are you doing extended find?  What's your default auto-wait timeout?  There's also an option under Tools -> Options -> Engines -> NameMapping called "Search for visible objects first"... make sure that's unchecked.  Also, make sure "Use extended find when possible" is turned off.  You may then want to go back to your mapped objects and remap parent objects for those that have the "Extended Find" flag turned on.  These are factors that will improve object identification performance.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Frequent Contributor

Re: What is the best way to have object repository

Thanks for the reply.

I did update the settings as mentioned. still we see the slowness. we are not using any extended find.

 

to find the object we use the below code

w=namemapping.sys.legaclt.findallchildren('FullName","*"&typobj,30)

for i = o to uBound(w)

set w1 = obj(i)

if instr(w1.mappedname,field)>0

log.messag(object found)

 

here field is the maaped name that is passed in the excel.

Community Hero

Re: What is the best way to have object repository

Since you have the full name of the object, don't use FindAllChildren.  Use FindChild.