Ranorex Studio Test suite
Help CenterUser GuideRanorex Studio fundamentals

Test suite

The test suite is where you build, organize, and run your tests in Ranorex Studio. A test suite is mainly built from test cases, which are in turn built from modules. You can also add smart folders to structure your test. The test suite is also where you configure variables and data binding for data-driven testing. You can run test suites in Ranorex Studio or the stand-alone Ranorex Test Suite Runner.

In this chapter

    Sample solution

    The explanations in the test suite chapter are based on a sample solution. You can download it below.

    Sample solution

    Theme: Test suite

    Time: Less than 10min

    Download sample solution

    Sample solution installation:

    Unzip to any folder on your computer.
    Start Ranorex Studio and open the solution file RxDatabase.rxsln

    tipp icon

    Hint

    The sample solution is available for Ranorex versions 8.0 or higher. You must to agree to the automatic solution upgrade for versions 8.2 and higher.

    What is a test suite?

    The test suite is the control center where you build test cases from recordings or code modules and structure them. This section describes the anatomy of a test suite.

    Test suite file and test suite view

    Test suite file and test suite view

    Test suite file RxDatabase.rxtst

    • The sample solution contains a single test suite. It is possible for a test solution to contain multiple test suites.
    • The content of a test suite and its structure are maintained in a test suite file. This file is stored in the default test project folder of the test solution.
    • To view the contents of a test suite, double-click the test suite file in the project file view.

    Test suite register tab
    The register tab indicates the name of the test suite in the test suite view

    Test suite in the test suite viewTest suite with the name RxDatabase in the test suite view

    Test suite file

    Each test suite is contained in a test suite file. This file which is managed through the project file view. The file type is rxtst, which is an abbreviation for ‘Ranorex test suite’.

    Test suite file in project file view

    Test suite file in project file view

    Important to know:

    • The name of the test suite and its associated file default to the name of the test project.
    • Test suite file names can be changed as needed. However, refer to the recommendations for file names which are addressed in a later chapter.
    • Because the test suite file is an XML file, its contents can be viewed by means of any text/XML editor or viewer.

    Hierarchical test suite structure

    Although a test suite can be large and complex, the basic structure of a test suite is simple and easily explained. A test suite contains structuring elements and test contents, both of which are explained in overview herein and in more detail and along an illustrating example in further chapters.

    A test suite implements a folder-like hierarchical structure with different structuring items and testing items. Let’s have a look at the basic structuring elements.

    Test suite structuring elements

    Test suite structuring elements

    Test suite

    • The test suite is the ‘root’ container for all further test content and structure
    • A test suite itself does not contain recording modules, or code modules directly
    • A test suite solely contains other structuring elements, including test cases, smart folders, and setup and teardown sections.

    Test case

    • A test case is the main data structure to contain recordings, code modules and module groups
    • Test cases implement special functionality with respect to data binding and conditions which will be explained in corresponding advanced chapters
    • Test cases can also be further structured with smart folders

    Smart folder

    • Smart folders are a structuring element for building a hierarchical, folder-like structure within test suites and test cases
    • Beyond this, smart folders implement special functionality with respect to data binding and conditions which will be explained in corresponding advanced chapters

    Setup region

    • All test items within a setup region are performed prior to any other test activity of the containing structure
    • Test suites, test cases, and smart folders may contain a setup region.

    Teardown region

    • All test items within a teardown region are performed after any other test activity of the containing structure
    • Test suites, test cases, and smart folders may contain a teardown region

    Test items

    Test items are recording modules, code modules, and module groups. These test items are contained in test suite structuring elements.

    Test items

    Test items

    Recording module

    • Recording modules contain actions in a sequence which are executed during the test run
    • Recording modules are included in test cases, smart folders, or module groups

    Code modules

    • Code modules are the representation of test actions in a programming language
    • This expert concept is introduced and explained in a separate chapter

    Further reading

    Code modules are an expert topic which is introduced and explained in detail in > Ranorex Studio expert > ⇢ Code modules.

    Module groups

    • Module groups are used to group recording modules and code modules into meaningful collections
    • Module groups are managed by a module group editor, a tool which opens automatically
    • Additionally, module groups can be further structured with simple folders

    Test suite structure summary

    This section summarizes the test suite structure and its contents with all possible combinations at hand. See the below-displayed image for an overview.

    Test suite structure summary

    Test suite structure summary

    Important to know:

    • Test suites can only contain test cases and smart folders
    • Smart folder when directly below a test suite also can only contain new test cases and smart folders
    • Any other test case and smart folder can contain every item except a test case

    Link between test suite & test items

    This chapter explains the relationship of the test suite (i.e. test suite structure) and the test items.

    The recording modules and the code modules are stored and managed in corresponding recording files and code module files and physically stored within the project folder structure.

    The test suite only holds references to these files! Whenever a recording module or a code module is included into the test suite structure, only a reference of this test item is included.

    Dragging test items from module browser view to test suite

    Dragging test items from module browser view to test suite

    Important to know:

    • Recordings are physically stored and managed in the project file structure
    • The module browser view is the recording’s collection from which recordings are used to build test cases in the test suite (left window pane in the image)
    • Be aware that the test suite only contains references to the recordings of the module browser view, or the project file view (right window pane in the image)