This guide explains how to structure your Ranorex test automation projects using test suites, folders, repositories, and data sources. Designed for testers, QA leads, and non-technical users, it emphasizes clarity and practical setup strategies.
Solution Structure
A solution in Ranorex acts as the top-level container. It can contain one or more projects, each with its own test suite and associated files.
Typical layout:
-
Solution:
MyAppTests-
Project:
LoginTests -
Project:
spanShoppingCartTests -
Project:
CommonModules(shared modules and repository)
-
Project:
Projects and Test Suites
Each project usually includes:
-
A
.rxtstspan Test Suite file - One or more modules
- A local repository
- Optional data files
Projects can be:
- Application-specific (e.g., testing login or checkout features separately)
- Purpose-specific (e.g., shared functions or UI elements)
Test Suite Organization
The Test Suite is where you structure and run your tests. It contains:
- Test Cases: Each represents a logical scenario (e.g., “Login Valid User”).
- Modules: Reusable blocks of automation (e.g., “Enter Username”).
- Setup/Teardown: For initializing and cleaning up before/after tests.
- Folders:
- Smart Folders: Bind to data; execute test cases within per data row.
- Regular Folders: Visual organization only; no logic applied.
Example
- A Smart Folder “Login Users” could bind to a Users.csv file and execute the same test case for each user.
- A Regular Folder “Smoke Tests” simply groups related tests visually.
Modules
Modules are reusable components. Each one performs a simple task like:
- Clicking a button
- Entering text
- Validating a field
Data Sources
Ranorex allows you to inject dynamic test data into test executions via CSV files, Excel sheets, or databases.
Types
- Global Data Source (e.g., applied at Smart Folder or Test Suite level)
- Local Data Source (bound only to a specific test cases.
Tips
- Use Smart Folder data binding to loop over many test cases using shared data.
- Use Local Data when only one test case needs that dataset.
Repositories
A Repository is where Ranorex stores all UI element identifiers (e.g., buttons, text fields, dropdowns).
Each project has its own repository by default. However, to avoid duplication, you can:
- Move shared elements to a “CommonModules” project.
- Reference this repository from other projects.
This approach ensures that changes to UI elements need to be updated only once.
Visual Diagram
This diagram illustrates the structured organization of a Ranorex solution:
Best Practices Summary
| Area | Best Practice |
| Projects | Separate by app area or purpose |
| Test Suite | Use Test Cases + Modules with setup/teardown |
| Smart Folders | Use for data-driven testing |
| Regular Folders | Use for organizing large test suites |
| Data Sources | Prefer global for shared data, local for specific tests |
| Repositories | Centralize common elements in shared project |