cancel
Showing results for 
Search instead for 
Did you mean: 

Automate NameMapping of objects?

SOLVED
Occasional Contributor

Automate NameMapping of objects?

I'm currently looking into pairing TestComplete with another desktop automation testing tool which will pull the active processes from the target application and inherently start mapping its children. This would theoretically reduce the need to map every object manually. Then again, it wouldn't account for an extra index or any other properties that are custom to the user's needs. Thus, the user would still need to polish the NameMapping tree, but it would already be there!

 

Has anyone tested this before? Automating a section of another automation tool?

And, does this actually sounds feasible?

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Automate NameMapping of objects?

Hi,

 

Isn't batch-mapping (https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/add/...) the thing you are looking for?

Maybe, combined with custom templates (https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/temp...)...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

8 REPLIES 8
Community Hero

Re: Automate NameMapping of objects?

TestComplete will map your objects automatically for you.  What is the other tool going to add?

Occasional Contributor

Re: Automate NameMapping of objects?

You're absolutely right. TestComplete indeed does map the objects automatically. The current platform that I'm testing contains a "looooot" of objects that are eventually needed for testing purposes, hence going through the process of choosing to map all of its children automatically or manually. 

 

I'm trying to get rid of the repetitiveness of accepting the configuration for each object. And, I'm looking for a tool that will be able to accomplish such.

 

Thanks!

Community Hero

Re: Automate NameMapping of objects?


@automTest wrote:

You're absolutely right. TestComplete indeed does map the objects automatically. The current platform that I'm testing contains a "looooot" of objects that are eventually needed for testing purposes, hence going through the process of choosing to map all of its children automatically or manually. 

 

I'm trying to get rid of the repetitiveness of accepting the configuration for each object. And, I'm looking for a tool that will be able to accomplish such.

 

Thanks!


While that "repetitiveness" may be inconvenient and/or annoying, it is necessary.  In many modern developed applications, both web and desktop, there are dynamic factors in identifying objects.  So, sometimes, using the "defaults" in the mapping are not always the best ones to use. 

 

Easy example:  When using the Notepad application in Windows, the main window has a caption that contains the name of the text file you are editing.  This MAY not always be the name of the file each time you open an instance of notepad.  So, if you want to identify a SPECIFIC instance, you need to make sure you have that proper filename in the caption if you're using the caption as an idemtifying factor.  HOWEVER, if you want to use ANY Notepad instance in your tests, you need to either EXCLUDE the caption from your identifying attributes or somehow modify those properties to wildcard the caption appropriately.

 

So... most of the time, when you're using automatic mapping, regardless of the tool, you're going to want to review how the tool mapped the object to make sure that such dynamic factors are accounted for.


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
Extensions available
Occasional Contributor

Re: Automate NameMapping of objects?

I agree 100% since I've experienced what you just mentioned word to word. Moreover, my thought process relies in the following,

1. Having a NameMapping tree that contains all existing objects in that software platform to it's full capacity without any individual property customization

2. Having an empty NameMapping file and manually mapping objects from scratch while choosing the desired properties as needed.

 

I'm looking for the former being that it would speed things up initially (assuming it doesn't take too long to map everything in one go) and provide NameMapping system foundation for other projects that test the same software application.

 

I'll probably be in the lookout for open-source software in the meantime.

 

Thanks!

Community Hero

Re: Automate NameMapping of objects?

Hi,

 

Isn't batch-mapping (https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/add/...) the thing you are looking for?

Maybe, combined with custom templates (https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/temp...)...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================

View solution in original post

Community Hero

Re: Automate NameMapping of objects?

Our solution was to automatically map everything and then only adjust the objects that really need it.  Saves a lot of time.

Occasional Contributor

Re: Automate NameMapping of objects?

If I may ask, why is that better than mappping your program as you test different parts of it? Don't you use recorder functionality?

Highlighted
Community Hero

Re: Automate NameMapping of objects?

I can't speak for @Marsha_R but let me respond from my experience.

 

1) Recorder is OK.  It does auto-map as you record.  But you will (and should) ALWAYS go back and review what was mapped and make any edits for stability, dynamic properties, etc.  So, since you're going to be reviewing the mapping anyways, why not take the time to map it manually?

2) By mapping it manually ahead of time, TestComplete will use that mapping rather than it's own.  So, again, it saves some time in the long run by making sure you have a good, stable object mapping to work off of for ALL your tests.


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
Extensions available