This article explains the items that make up a test suite, how to add them, what they’re used for, and the hierarchy rules they follow.
Add test suite items
You can add items to a test suite in the following ways:
- Use the ADD button in the test suite view toolbar.
- Use the context menu in the test suite workspace.
- Drag and drop from the module browser. This only works for modules and module groups.
Test suite items
Test suite items fall into two categories:
-
Structure items form the framework of your test (what runs, in what order).
-
Test action items contain the actions to perform during your test (the recorded or coded steps).
The test suite
The test suite item is the root structure item. It contains all other items and can’t be cut, copied, pasted, or deleted.
The test suite item can contain only structure items as direct children (no modules or module groups directly under the test suite).
Use the test suite item to configure global parameters and report settings for the entire test suite. Access these settings via the test suite context menu.
Test cases
A test case is a structuring item. Each test case represents a primary function or scenario in your test suite (for example, “Create customer” or “Add entry to database”).
• Build test cases by adding modules and module groups.
• Add smart folders inside a test case to organize content further.
• Test cases cannot contain other test cases.
You can configure error behavior, data bindings, conditions, and other options for a test case from its context menu.
The report's success counter only counts test cases.
Smart folders
Smart folder organize test content in a folder-like 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 that help you prepare and clean up the application under test (AUT).
You can add one setup region and one teardown region to the test suite item, to test cases, and to smart folders. Ranorex Studio always places the setup region at the beginning of an item, and the teardown region at the end.
To add a setup or teardown region:
- Right-click an item in the Test suite.
- Click Add setup or Add teardown.
Execution behavior
- Setup regions always run before anything else in the direct parent item. Use them to bring the AUT to the required state, for example, start the AUT, and log in.
- Teardown regions always run after everything else in the direct parent item, or when an error occurs in that parent item. Use them to clean up after a run, for example, delete created data or close the AUT.
Modules
Modules are test action items that contain the actions performed during a test.
You can add modules to all structure items, except:
- The test suite items (modules cannot be direct children of the test suite).
- Smart folders that aren't a child of a test case.
There are two types of modules:
- Recording modules: Actions you recorded (or added) using the Ranorex Recorder and its action table.
- Code modules: Actions implemented in code.
You can configure data bindings for a module from its context menu.
Module groups
Module groups are test action items that group multiple modules that logically belong together (for example, a set of validations that usually run as a unit).
You can add module groups to all structure items, except:
The test suite item
Smart folders that aren’t a child of a test case
Ranorex Studio stores all module groups in a separate [Project name].rxtmg file under the project in the Projects view.
There are two ways to add module groups:
Direct grouping
- In the test suite view, select one or more modules that you want to group.
- Right-click one of them and click Group selected modules.
- The new module group opens in the module group view. The new module group also appears in the Module Browser.
The module group view opens with the new module group selected. The new module group also appears in the module browser.
Adding modules individually
- In the test suite view, right-click the structure item that should contain the new module group.
- Click Add > New module group. The module group view opens with the new module group selected.
- 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.