QA tester, automation specialist, automation systems engineer — these are just a few of the names for a test automation engineer. No matter what their title may be, they're essential to the software development life cycle, so here's a look at what they do. Markets and...
A repository contains representations of user interface (UI) elements used in a test, called “repository items.” Repository items are organized in a tree-like structure. Each item has a RanoreXPath that uniquely identifies it and allows Ranorex to link the item with the corresponding UI element of the AUT.
In this chapter, you’ll learn how to create, manage and structure repository items. You will also learn how to use multiple repositories and about special use cases such as embedding repositories.
Ranorex Studio tests consist of a series of interactions with elements in an application’s user interface. UI elements include buttons, tabs, drop-down menus, text fields, and so on. Ranorex Studio represents UI elements as repository items in order to work with them.
UI elements in the Ranorex Studio Demo Application
The repository and repository items
Repository items are stored and managed in the repository in a tree-like structure. To access the repository, open the repository file from the projects view. The repository file also opens automatically when you open a recording module. By default, the repository appears in the lower section of the Ranorex Studio work area.
Repository and repository items
Repository items in tree-like structure
- Each repository item has a name. By default, this name is inherited from what the UI element is called in the internal structure of the AUT.
- You can rename a repository item as desired.
- A repository item’s position in the tree-like structure (i.e. which folder it’s in) suggests where the corresponding UI element is located in the AUT.
Paths of repository items
- Each repository item is defined by its path.
- The path is derived from the physical position of the UI element in the AUT.
- The path follows a special syntax, the RanoreXPath.
Repositories are organized in a tree-like structure that follows the internal structure of the AUT’s UI. UI elements that contain other UI elements are represented as folders in the repository, with app folders acting as top-level elements and rooted folders as children.
Portions of the UI represented by the repository structure
- RxMainFrame is an app folder. It represents the complete program window of the application that contains all other UI elements.
- In the example, its only direct child item that doesn’t contain any other items is the Exit button in the lower right corner.
- RxTabIntroduction is a rooted folder. It represents the screen area of the Introduction tab.
- In the example, it is a direct child of RxMainFrame and contains all UI elements in the Introduction tab.
The repository file
The contents of the repository are stored in a repository file. As with other Ranorex files, you can access it from the projects view or in the project’s folder in Windows. Each repository file also has two subfiles.
Repository file and subfiles in the projects view
This is the caption of the image
- The repository file has the file ending
.rxrep, which stands for Ranorex repository.
- The default file name is a combination of the parent test solution (i.e.
Repository. You can rename the file to your liking.
Repository code representation
- The file with the ending
.csis the code representation of the repository in C#.
Image hosting file
- The file with the ending
.rximghosts all screenshots linked to repository items.
All of these files are also available in the respective project’s folder in Windows.
Repository files in a project’s folder
Add a repository
If your project doesn’t contain a repository, you can add one. You can also add ⇢ multiple repositories to a project.
A dialog opens with the repository template preselected.
Name the repository.
Delete a repository
In the projects view, select the main repository file (
- If the repository doesn’t contain any items that are linked to actions, it is simply deleted.
- If at least one repository item is linked to an action, a dialog informs you about the consequences and you must confirm the
Confirmation dialog when deleting a repository that contains linked items