Welcome to the Ranorex Support Portal

Test suite structure

In this chapter, you’ll learn about the items that make up a test suite, how to add them, their purpose and functions, and the hierarchy they follow.

In this chapter

Add test suite items


There are three ways to add items to a test suite.

  1. Use the ADD button.

  1. Use the context menu in the test suite workspace.

  1. Drag and drop from the module browser. This only works for modules and module groups.

Note Icon

Note

You can only add items to the test suite as the test suite hierarchy permits. If an item can’t be added at the desired position, it is grayed out in the menu. The test suite hierarchy is explained at the end of this chapter.

Test suite items


In this section, you’ll learn about the items that make up a test suite. Test suite items can be separated into two groups, structure items and test action items.

Structure items form the framework of your test.

Test action items contain the actions to perform during your test.

The test suite

The test suite item serves as the root structuring item. It contains all other items and cannot be cut, copied, pasted, or deleted. It can contain only other structuring items as direct children, i.e. no modules or module groups.

The test suite item is where you configure global parameters and report settings for the test suite. Access these through the context menu.

Test cases

A test case is a structuring item. Each test case represents a primary function of your test suite, such as adding an entry to a database. Build test cases by populating them with modules and module groups. You can also add smart folders to test cases to organize them further. Test cases cannot contain other test cases.

You can configure error behavior, data bindings, and conditions for test cases through their context menu.

Test cases are the only items counted in the test report success counter.

Smart folders

A smart folder is a structuring item. Use smart folders to organize your test suite as you would in a folder hierarchy. You can populate smart folders with modules and module groups, but only if the smart folder is a child of a test case.

You can configure error behavior, data bindings, and conditions for smart folders through their context menu.

Setup/teardown regions

Setup and teardown regions are structuring items. You can add one of each to the test suite item, test cases, and smart folders. The setup region will always be placed at the beginning of an item and the teardown region at the end.

To add a setup or teardown region:

  1. Right-click the desired item.

  2. Click Add setup or Add teardown.

Adding setup & teardown regions

Setup regions are always executed before anything else in the direct parent item. Populate setup regions with the modules and module groups needed to bring the AUT to the state required for the following modules to run, such as starting the AUT and logging in.

Teardown regions are always executed after everything else, or when an error occurs in the direct parent item. Populate teardown regions with the modules and module groups needed to clean up the AUT after a test run, such as deleting all entered data and closing the AUT.

Modules

Modules are test data items. They contain the actions performed during a test. You can add modules to all structure items except the test suite item and smart folders that aren’t the child of a test case.

There are two types of modules:

Recording and code modules
  1. Recording modules

  • Contain actions you’ve recorded or added using the Ranorex Recorder and its action table.
  1. Code modules

  • Contain actions programmed in code.

You can configure data bindings for modules through their context menu. You can also group several modules to create module groups, as explained below.

Module groups

Module groups are test data items. Use them to group modules that logically belong together, such as data validations that usually occur together. You can add module groups to all structure items except the test suite item and smart folders that aren’t the child of a test case.

All module groups are stored in a separate file. You can locate this file under the project in the projects view. By default, it’s named
[Project name].rxtmg (for Ranorex test module group).

Module group file

There are two ways to add module groups:

Direct grouping

  1. In the test suite view, select one or more modules that you want to group.

  2. Right-click one of them and click Group selected modules.

  3. The newly created module group opens in the module group view.
    The module group view opens with the new module group selected. The new module group also appears in the module browser.

Creating a module group with direct grouping

Adding modules individually

  1. In the test suite view, right-click the structure item to contain the new module group.

  2. Click Add > New module group. The module group view opens with the new module group selected.

Creating a module group using the context menu
  1. Drag and drop the desired modules from the module browser to the module group.
    The new module group appears in the module browser. You can rename module groups and organize them in folders in the module group view.

Test suite hierarchy


Test suite items are organized in a hierarchy. This hierarchy controls where items can be added or moved, as illustrated below:

Test suite hierarchy

USERS LOVE US

SUBSCRIBE TO OUR NEWSLETTER

Get the latest test automation information right in your mailbox.

FOLLOW US

© 2024 Ranorex GmbH. All Rights Reserved