Questions for a global repository

Ranorex Spy, Recorder, and Studio.
steven11
Posts: 2
Joined: Wed Aug 25, 2010 9:45 am

Questions for a global repository

Post by steven11 » Wed Aug 25, 2010 10:01 am

Hi,

I'm new to Ranorex and have got several questions for building a global repository that can be used in several test solutions:

1. Say, I store the global repository under \Test\Repo.rxrep and update it with RanorexSpy. When I use this repository in a recording of the project (\Test\Bugs\Bug001\Bug001.csproj), Ranorex will ask me how I want to include the repository. I choose link and don't merge it. The problem is: the code-behind file will not be stored in \Test\Repo.cs. Instead Ranorex will add the source file as \Test\Bugs\Bug001\Repo.cs. This is quite bad I think because we will have lots of test projects and therefore when the repository changes all the source files would need to be updated. Is there any way to circumvent this problem?

2. Related to 1), the namespace of the generated source file is always the namespace set up in the test project. Therefore it's not possible for me to add additional code for the repository (by using the partial class feature):
In a file \Test\Repo.Additions.cs I have to use the same namespace as in the file autogenerated by RanorexSpy. But linking this source file to the project doesn't work because this namespace is always different to the autogenerated file that's used in the project...

3. Is it possible to use multiple repositories for a recording (without usercode actions)? It would be nice if I could use items of the global repository and items of a project specific repository.

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

Re: Questions for a global repository

Post by Support Team » Thu Aug 26, 2010 10:27 am

Regarding question 1. All code that is generated is specific to the project and needs to be that way so that the recordings and other code in the project can have access to the classes and items in the repository. So, that means that you are correct the code needs to be updated. This is a known issue when linking repositories. We are working on a way to make this work better.

Regarding question 2. We have corrected the namespace problem associated with linked repositories.
The fix will be included in the next version. In the current version the namespace it changed to match the project. The fix was simply not to modify the namespace for linked repositories. We are also considering not updating the namespace at all but letting the user have control over it. This could however cause problems for less knowledgeable users.

As a work around to the partial class problem you could use extension methods
http://msdn.microsoft.com/en-us/library ... S.90).aspx

Regarding question 3. using multiple repositories in one recording is not supported. If you need this functionality, it suggests that your recordings are performing to many different actions. You might consider splitting up the recordings into more concise reusable modules. You can then call the recordings from other recordings in user code if needed.

Regards,
Ron
Support Team

steven11
Posts: 2
Joined: Wed Aug 25, 2010 9:45 am

Re: Questions for a global repository

Post by steven11 » Tue Aug 31, 2010 7:36 am

Thanks for your answer, I'm looking forward to the next release of Ranorex.