In Ranorex Studio, a solution is the top-level container for your test files. You organize solutions into one or more projects. While Ranorex Studio supports different project types, you typically use a test suite project to build automated tests. A test suite project contains one or more test suites that organize your test cases and modules.
In this article, you learn how to create a new solution to test a desktop application. New solutions you create always include a test suite project.
Solution wizard
- Click File > New > Solution wizard.
- In the Welcome to Ranorex Studio dialog, select Desktop.
- Configure your solution and review the specifics below:
- Solution name: Give the solution a meaningful name or use the default name. By default, the solution name also identifies the test suite project.
-
Location: By default, Ranorex Studio creates new solutions in the RanorexStudio Projects folder in your Documents\Ranorex directory (e.g.,
C:\Users<user>\Documents\Ranorex\RanorexStudio Projects).
Additional options - Project name: By default, the test suite project name is identical to the solution name. Here you can specify a different name for the project.
- Language: Programming language of the project. C# is the default; VB.NET is also available.
- Create directory for solution: If you deselect this option, Ranorex Studio saves the solution files in the project’s folder instead of in the parent folder of the project’s folder.
- Add solution to source control: Check the box to add your solution and the project to a source control system.
Select the application under test
Select your application under test:
-
Running applications: Select a currently running application from the list.
-
Browse for application: Select Browse for app... to browse an application using Windows Explorer. Optionally specify a command-line argument.
Select recording behavior
Use this screen to configure whether Ranorex Studio evaluates just one application, several applications, or all running applications when searching for UI elements. This is part of Ranorex Studio’s whitelisting capabilities.
Choose one of the following recording behaviors:
- Focus on single application: Ranorex Studio records user interactions only in your selected application under test. Everything else is ignored. The whitelist contains only your AUT.
- Focus on multiple applications: In addition to your AUT, you can add other processes to the whitelist to be recorded by Ranorex Studio.
- No focus applied: Ranorex Studio records all user interactions. The whitelist is empty.
- 2. Click Continue.
Final screen and tutorial panel
Once setup completes, the tutorial panel appears and provides you with a quick tutorial to guide you through the first steps of your test.
- Read through the instructions and click Finish to complete the setup.
Structure of the desktop solution and its project
Once you complete the setup, Ranorex Studio opens in the test suite view with a simple prebuilt desktop test suite. This test suite is part of the test suite project that was created automatically with this desktop solution.
- Test suite view: This is where you build and control your tests
- Solution with a project that contains a simple prebuilt test suite: The test case includes three recording modules:
StartAUT: Starts the Demo Application
Recording1: Empty and ready for you to record test actions
CloseAUT: Closes the Demo Application. - Recording module view: In the recording module view of Recording1, you can record and manage test actions.
- Empty actions table: This is where your recorded actions appear.
StartAUT and CloseAUT modules
The StartAUT and CloseAUT modules in the desktop solution template use a special mechanism to ensure the correct instance of the started AUT is closed. This helps improve stability for tests based on the template.
This mechanism is based on the advanced concept of variables and parameters, which is why the solution includes a variable bound to both modules.
Reference: To learn more, see Define variables and Parameters.