Problems changing repositories

Ask general questions here.
tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Problems changing repositories

Post by tallahassee101 » Thu Feb 24, 2011 8:44 pm

So the project I have has 4 different repositories in it due to several different people coding the tests. I have recently merged those 4 repositories down to 1 and changed all the *.cs files of the recordings to match the correct repository:
public static TacViewLib.TacViewLibRepositoryUISpecific repo = TacViewLib.TacViewLibRepositoryUISpecific.Instance;

However when I open the recording the repository has not been changed. So I use the built in ranorex steps, click on the repo and it changes to embedded. Then double click on the embedded repo and choose the "TacViewLibRepositoryUISpecific" repo. It asks me if I wish to save my current embedded repository, I say no, and then it asks me about merging into the new repository, I say no as I have already merged all the items. Then it changes to the new UISpecific repository and almost every item name gets unlinked.

So it seems like there is no connection from the CS file to the Recording file. Is there anyway to get these recording files to properly relink to the new repository? I have no build issues because all of the names are there or I have modified the CS files to map to the correct path.

I went about merging my repositories in this way as it seems there is an issue using the built-in merge functionality of Ranorex. I had the same exact problems when I tried to switch the Recording files and have Ranorex "merge" my old repository into my new one, all the item names were unlinked.

In addition, is there any way to "organize" your repository items. The column bars at the top do not seem to have any organize function on them, such as a simple alphabetical organization. This would be very helpful in finding duplicate repository items as ranorex tends to often add to my project.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Problems changing repositories

Post by Support Team » Fri Feb 25, 2011 6:00 pm

Hello,

The cs file for a rxrec is generated automatically. Your changes are overwritten. Make your changes in the rxrec file instead. You could do this also using an editor.

When you relink a rxrec to a new repository using Ranorex Studio you should answer yes at the merging question. Ranorex will check what is there and what not there and only copy if not there.
Did it nevertheless lose the links?

You cannot sort the repository, because the items are in a tree. You could use a text compare tool (e.g. Beyond Compare) to find items that have been added to the repository.

Regards,
Roland
Ranorex Support Team
.
Image

tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Re: Problems changing repositories

Post by tallahassee101 » Fri Feb 25, 2011 6:11 pm

I tried what you suggested about clicking yes first. It lost all my links AND merged some of the repository items, so I ended up with a massive repository of duplicate items. I merged the repositories myself and have had to hand change all the repository items. This is beyond frustrating for a tool that runs ontop of a repository.

I would highly recommend putting some smarter merging code, as well as the ability to sort repository items alphabetically. This is a frustratingly hard task for something that should integrated into the tool.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Problems changing repositories

Post by Support Team » Fri Feb 25, 2011 7:57 pm

Hello,

I agree that it should not happen that you have to hand merge or hand relink a recording to a repository. I'll instigate some effort in this direction inside the team here at Ranorex.

Roland
Ranorex Support Team
.
Image

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Problems changing repositories

Post by Support Team » Mon Feb 28, 2011 11:45 am

Hello,

I'm sorry to see that you had such a hard time merging your repositories. It sounds like the reason you had the problem is the structure and or paths of the items in the manually merged repository did not match those in the original repository.

Normally, merging is performed simply by selecting a different repository for the recording and letting the automatic merge do its job.

The automatic merge attempts to find a match for every item that it wants to have in the target repository. It looks at the names and tree structure as well as the path for the items. The path, naming, and tree structure must match for it to be considered an item match. If no item match is found, then the item is added (this could actually be a duplicate, but only artificial intelligence could prevent that). In most cases you would only end up with a few duplicates to modify, and then only for customized items.

So, in your case what got you into trouble was doing the manual merge first. Normally you would save that for after the auto merge has done its work.

Regards,
Ron
Ranorex Team

tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Re: Problems changing repositories

Post by tallahassee101 » Mon Feb 28, 2011 8:58 pm

Well I was able to get this to work after a lot of hassle, but I think the main problem IS the automatic merge. It did not work for me at all with my repositories. When it doesn't find an exact match (which is most of the time it seems), it creates a new repo item named "RepoItem1" (if the original was named "RepoItem"). Then the recording did not link to "RepoItem1" so it makes automatic merge pointless. Manually merging does the same thing.

tallahassee101
Posts: 169
Joined: Thu Jan 13, 2011 2:06 pm

Re: Problems changing repositories

Post by tallahassee101 » Fri Mar 04, 2011 4:31 pm

Ranorex 3.0 solved our issues with repository items. The merged repository is now cleaned up and much more manageable. Thank you for adding this cleanup feature. I was wondering if there is any plans for a feature that would see if there are duplicate repo items ( different names, same/similar RxPaths ) ?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Problems changing repositories

Post by Support Team » Mon Mar 07, 2011 12:28 pm

Hi,

thank you for your feature request.
We will add this to our list and it will be available in one of our future releases.
You can use the repositories search functionallity instead.
Here you can search by names, paths, or both.
The problem is, that you can only do this for one specific path/name at one time.
So you can only check if there is a duplicate for one path/name you enter manually.

Regards,
Tobias
Support Team
.
Image