Welcome to the Ranorex Support Portal

Manage multiple repositories

By default, a Ranorex Studio project contains a single repository file that’s used automatically for each new recording module. You can manage all repository items that your modules reference in a single repository, but there are also good reasons for having multiple repositories in a single project. This chapter explains these reasons and describes how to work with multiple repositories.

In this chapter

Note Icon


The screencast “Manage multiple repositories” walks you through information found in this chapter:

Watch the screencast now

Reasons for multiple repositories

Testing different user interfaces

Let’s say your test suite contains test cases for a web application and test cases for a user interface of a client application. In this scenario, using two repositories would make sense. One would contain the repository items for the web application, while the other would contain those for the client application. You could also separate the repository items for both applications in a single repository by using simple folders, but using two repositories is more convenient, especially when working in a team.

Modularizing repositories

It’s a good idea to modularize repositories in a way similar to recording and code modules. For example, when you think about a rich client application with main menus, ribbons, or toolbars, you would create small reusable recordings for clicking UI elements in the main menu like File > Open > Handle the Open File Dialog etc.

All these reusable modules work with the main menu, the main toolbar or similar, i.e. shared controls. Therefore, it’s a good idea to also base them on a repository which exclusively represents these shared controls.

Multiple testers on the same project

While working alone on a project, a single repository is often sufficient and usually won’t be an issue. However, when working with others, this can quickly result in conflicts. This can be circumvented by using multiple repositories. Also make sure to set up rules and responsibilities, like: Who may rename repository items? Who may restructure repositories? Who may delete items?


Some of our customers have tests with thousands of repository items. It’s quite obvious that keeping all of them in one repository would make it incredibly hard to maintain, not to mention the file size of such a repository. As your tests grow larger, think about how you can sensibly divide your repository items into different repositories to keep them maintainable and performant.

Add a new repository

  1. In the Studio toolbar, click the Add repository button.

  2. The repository template is preselected.

  3. Name the repository.

  4. Click Create .


  • The new and empty repository is added and can be seen in the projects view.
Added repository
  1. Newly added repository file with code representation and image hosting file.

  2. Default repository.

Assign a repository to a module

Once you have more than one repository, you can assign them to different recording modules. You can then use the repository items of that repository in the recording.

Currently assigned repository

The currently assigned repository is displayed in the repository’s toolbar when a recording module is opened.

Current repository assignment
  1. The recording module Recording1.rxrec

  2. … has the repository IntroductionRepository assigned to it.

Assigning a different repository

  1. In the repository toolbar, click the currently assigned repository.

  2. In the drop-down menu, click the repository you want to assign.

Assigning a different repository
  1. The currently assigned repository. In this case, it’s the default repository.

  2. The other available repository, DatabaseTesting.

  3. If your recording module contains actions that are linked to repository items from the currently assigned repository, you can choose to have Ranorex transfer these repository items to the newly assigned repository.



Get the latest test automation information right in your mailbox.


© 2024 Ranorex GmbH. All Rights Reserved