NameMapping File and Git Source Control
We use Bitbucket and Git Bash for all of our source control needs. We just started a proof of concept with TestComplete for a desktop Java application and are trying to establish our best practices and processes to scale the project up to 30 developers.
We are currently having issues predicting what will happen when pushing and merging versions of the Name Mapping file. First for our goal: we want more than one person to add to the NameMapping file. We are being careful to not work on the same parent objects. We are still however seeing conflicts with the "TypeInfo Item0" tags where the keys keep changing between developers (this is in the xml of the file itself). When we try to deal with merge conflicts, it overwrites some of the data that the previous person committed. This is resulting in a lot of rework and we're losing confidence in the ability to scale the tool due to the unpredictability of merging changes. Does anyone have suggestions on how to best maintain a single NameMapping file, handle conflicts, and a predictable way for all 30 of our QA developers to pull these changes daily to their local through Git Bash? The safest way seems to be downloading the NameMapping file from Bitbucket and using Merge With from within the tool. This is not however efficient and will eventually lead to mistakes.
Best practice is, always, to have a single person maintaining your NameMapping.
However, if you're going to have multiple, don't let the merge happen on the commit, have the merge happen on the pull.
1) Make NameMapping changes
2) Pull latest
And, something else that has helped us, make small, incremental changes to the mapping. The bigger the mapping change, the more chances there are to end up with conflicts.
[Hall of Fame]
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
What we did was allow everyone to do their own mapping but not check it in. Then every week or so, (we rotatethis amongst the team because it's a rotten rotten job lol) one person takes everyone's name mapping and merges them one at a time into an empty project and fixes all the conflicts. Then each person gets a copy of the merged mapping and tries their tests and if it works for everyone, it gets checked in.
I understand your intent but please allow me to express my deepest recommendation of NOT allowing multiple people to make changes to the tcnm file.
I recommend for you to work the way TestComplete would like you to work and not go against the grain.
I hope in the future that Testcomplete will implement a different way of using Name Mapping, maybe even a database like other products do, but until then, life is too short to have multiple people make changes to the tcnm file.
What has worked for us is to use your approach of using Test Completes built-in merge tool, but we also heavily use branches for any of our work so it minimizes the chance of conflicts.
Click the Accept as Solution button if my answer has helped
Basically, none of the files that compose TestComplete project should be (auto) merged except script unit ones. And even those must be merged with care.
/Alex [Community Champion]
[Community Champions] 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. Posts made by [Community Champions]
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.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
We were facing the same problem. As a result we did not use the name mapping. We use the 'find method' instead what makes the mapping much easier and even more maintainable. We have different scripts where we maintain the paths to the objects.
So, now, every time an object changes, you have to hope that someone tells you before your test breaks and you spend an afternoon trying to figure out why? And then you have to update your scripts? That may be a familiar way to do it, but it's still more efficient with the TC name mapping. Better to have to spend a little time managing one file when you know it's changed than have to troubleshoot random changes to objects.
Thats the point, the maintanace (in my case) is much lower than using NameMapping. We had more than 1000 mapped object in our NameMapping. Becasue the tested application was still in development we spent some days to find our objects again (structures changed, controls renamed and so on).
Now with the 'find' (we implmeneted some logic to be able to use this function for our purpose) its's much easier. Why- We can dynamicaly search for objects based on only a few 'base objects'(and their informations) and for example passolo- files which are provided by the developers (we do not need to change any properties).
If a structure chages I have only few points where i have to adjust to make it working again
Hi @tristaanogre ,
We have attempted a similar git workflow, and of course, run into conflicts on the pull. Could you elaborate more on how you reconcile the conflicts you run into? We're afraid of the consequences that could result from attempting to manually resolve each file. These are the files where we run into conflicts:
If there's no elegant way to handle this, we will most likely have a single curator handle all of our NameMapping, but that really hampers our productivity. If that person were to be out of the office, then everyone else is kind of left stranded.
Our plan B is similar to what @Marsha_Ris doing, where we would pass each other's unique NameMapping files to a single person. Have them merge in each file one-by-one using TestComplete's merging tool, then pass the updated "master" file back out to everyone.
As your title says, you appear to be a real "Community Hero" in these forums, so we appreciate your advice.