Structuring repository items | Ranorex
HomeUser GuideRanorex Studio FundamentalsStructuring repository items

Structuring repository items

When testing becomes more complex you soon face the challenge of large and possibly unstructured repositories. In order not to lose overview and organization, it is possible to structure repository items. This chapter explains how this is done.

In this chapter

    App folder

    An App folder is a data structure which can be seen as ‘root’ folder. App folders represent the top-level data container within the tree-like data structure of repository elements. In the current test example, the folders ‘RxMainFrame’ and ‘List1000’ are App folders.

    Note icon

    Note

    We know that explanation paradigms should have ‘nice‘ names. Nevertheless, the real world isn’t that way. Therefore, we show you the names of our real-world example and explain you how to deal with them.

    App folders and their GUI representation

    App folders and their GUI representation

    Important to know:

    • App folders are top-level folders
    • App folders are never sub-folders of other folders

    RxMainFrame

    • RxMainFrame is the top-level collection representing all UI-elements of the demo application

    List1000

    • List1000 is the logical collection of department selection items
    • This selection list is represented by a drop-down list in the working environment of the demo application

    Creating an app folder

    App folders can easily be created and added to the repository by opening the context menu in an empty area below the repository items.

    Creating an app folder

    Creating an app folder

    Select an area below the repository items and open the context menu
    Click Add new item > App folder or press Ctrl+P
    See the added new folder

    Renaming an app folder

    App folders can be renamed at your will.

    Renaming app folders

    Renaming app folders

    Click on the selected app folder, or press F2
    Give the app folder a meaningful name and see the result
    Note icon

    Note

    Note that the controlname in the path specification remains unchanged. This concept is explained as part of the advanced chapter UI-elements.

    Rooted folder

    A rooted folder is a data structure that contains all repository items referring to UI-elements which share the belonging to a distinct screen area. Technically spoken they have the same common ‘path’ (i.e. base location specification). In the current test example, the folder ‘RxTabStandard’ is a rooted folder.

    Rooted folder

    Rooted folder

    RxTabStandard

    • See the rooted folder and its GUI representation within the application
    • The rooted folder contains the longest common path specification of all items in it

    Repository items of rooted folder

    • See all repository items representing UI-elements and their representation within the application

    Creating a rooted folder

    Rooted folders can be easily created by opening the context menu and selecting ‘Add new item…

    Creating a rooted folder

    Creating a rooted folder

    Select the position where to add a new rooted folder and open the context menu Click Add new item Click Rooted folder, or press Ctrl+R

    Group in new rooted folder

    Grouping existing repository items into a new rooted folder by mouse-click is a convenient way of structuring repositories.

    Grouping existing repository items into a new rooted folder

    Grouping existing repository items into a new rooted folder

    Select the repository items which are to be grouped into a new rooted folder
    Open the context menu and click Group in new rooted folder
    Give the new rooted folder a meaningful name and see the grouped repository items

    Path specification of grouped repository items

    • See the base path specification of the new rooted folder
    • and the individual path endings of the grouped repository items

    Renaming a rooted folder

    Of course, rooted folders can be renamed at your will as any other repository item.

    Renaming a rooted folder

    Renaming a rooted folder

    Click on the selected rooted folder or press F2
    Give the rooted folder a meaningful name and see the result

    Optimizing rooted folder path for repository items

    One purpose of a rooted folder is to hold the longest common base path specification of its contained repository items. Once you create a rooted folder and include repository items in it, you can optimize the path specification of it and its contained repository items by mouse-click.

    Non-optimized rooted folder path specification

    Non-optimized rooted folder path specification

    See the rooted folder SelectGender with its two repository items ButtonFemale and ButtonMale
    See the empty base path of the rooted folder
    Full path specification of repository items which only differ in their individual control name at the end of the specification

    Optimizing rooted folder path

    Optimizing rooted folder path

    Action(s):

    1. Select the rooted folder and open the context menu
    2. Click Optimize folder path
    Optimized rooted folder path

    Optimized rooted folder path

    See the same rooted folder SelectGender with its two repository items ButtonFemale and ButtonMale
    See the base path of the rooted folder with the longest common path specification of its contained repository items
    Individual path specification of repository items

    Simple folder

    A simple folder is a data structure which can be created to collect and structure repository items which share a logical position, but not a physical position, namely a common path specification. It is the simplest way for structuring a list of repository items. Simple folders are never created automatically. They need to be created and managed manually.

    Creating a simple folder

    Creating a simple folder

    Select the position where to create a simple folder and open the context menu
    Click Add new item > Simple folder, or press Ctrl+D
    Give the folder a meaningful name and drag selected repository items into it