Introduction | Ranorex

Test suite

The Ranorex Test suite is the organization collection of all test cases of a test solution within Ranorex Studio. Herein the test cases are modularized, structured and organized and the automated test runs are initiated. Test cases further can be supplied with run-iterations and bound to conditions. It is also possible to bind data to variables within test cases in the test suite. Test runs can be started from within the Ranorex Test suite or alternatively from outside by means of a stand-alone Test suite runner software. In summary, the test suite is the central point of test-run organization and control.

In this chapter

    Sample solution

    The explanation of test suite concepts is based on a sample solution which can be downloaded hereinafter.

    Training! What do I do?

    Theme: Test suite
    Time: Less than 10min

    Download sample file

    Installation:

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

    What is the test suite?

    As summarized in the definition, the test suite is the control center from where test cases are modularly built out of recordings, or code modules and structured in a folder-like way. This section is to introduce 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 current example shows one test suite (file), while a test solution may contain two or more test suites
    • Test suite content and structure are managed in this test suite file which is stored in the initial default test project folder of the test solution
    • Double-click the file in the project file view to open the test suite view
    Test suite view

    • The register tab indicates the test suite view
    Test suite in test suite view

    • Test suite with name RxDatabase in test suite view

    Test suite file

    The test suite is represented by a test suite file which is stored and managed through the project file view. The file type is rxtst which is the abbreviation for ‘Ranorex test suite’.

    Test suite file in project file view

    Test suite file in project file view

    Important to know:

    • The file name of the test suite and the test suite’s name are initially derived from the test project in which the test suite file is stored.
    • Test suite file names can be changed at will although there exist some recommendations which are addressed in a further chapter.
    • The test suite file is an XML-file whose contents can be viewed by means of any text/XML editor or viewer.

    Hierarchical test suite structure

    Although test suites usually are 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
    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 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:

    • A test suite and a smart folder as a direct descendant of a test suite may only contain a new test case or a new smart folder
    • Any other test suite structuring element may contain any other structuring element except test cases and any test items

    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.

    Link between test suite structure & test items

    Link between test suite structure & test items

    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)