Whether your test is simple or complex, preparation is key in test automation. Preparation prevents mistakes and saves time in the long run. This chapter describes the steps to take before you start recording your test.
Recording recommendations
Take the time to consider the following recommendations. They can make your testing life easier and your work more efficient.
Application under test (AUT) | Do you want to start the AUT yourself each time, or do you want Ranorex Studio to start it automatically at the beginning of the recording? In either case, you need to know the installation path and any required starting parameters. |
Test data & parameters | Make sure you have all test data and parameters, such as login names and passwords, readily available for the test. |
AUT instances | Only run one instance of your AUT during recording. If you’ve created your solution using the RocketStart solution wizard, Ranorex Studio will start (and quit) your AUT automatically by default. |
Recording interaction | Unless you use whitelisting, all user actions are captured during recording, even accidental ones that are unrelated to the AUT. Make sure to disable anything that could interfere with recording, such as pop-ups. |
AUT: The Ranorex Demo Application
To better demonstrate the concepts and methods in this User Guide, check this app, the Ranorex Demo Application.
It serves as AUT for the explanations and samples in the fundamentals and advanced chapters of this User Guide
Download the latest version of Ranorex Demo Application. Unzip it to any folder on your system. For these tutorials, assume that it’s located in the /Downloads
/ folder.
Start the AUT
Before planning a test in detail, start the AUT to ensure that it is installed properly and is working.
-
Browse to the location where you unzipped the Demo App.
-
Double-click it.
- The Demo App’s Welcome screen appears.
- Check the Demo App opens and works correctly, close it again.
Plan the recording
Plan your recording well. It helps prevent tedious restructuring and editing later.
Use a recording script
- Think about the steps you need to record.
- Prepare the necessary input data (usernames, passwords, etc.).
- Perform the test at least once without recording.
Consider the recording size
- Keep recordings as small as possible.
- Larger, modular test cases can be built out of smaller, reusable recordings.
Plan how mouse movements will be recorded
- By default, mouse movements are not recorded without mouse clicks.
- When navigation through menus is important for the test, use mouse clicks for detection, or use the option for recording mouse movements within the Recorder control center.
Test definition
Following the recommendations above, we have defined a simple test with five steps. This same test serves as an example in the coming Ranorex Recorder chapters.
- Open the Ranorex Demo Application.
- In the “Enter your name” field, enter Harry and click Submit.
- Verify that the welcome message changes accordingly.
- Reset the welcome message.
- End the demo application and stop the recording.
Create a desktop test solution
-
In the Solution Wizard, create a desktop test solution and select the Demo Application as AUT in the second step during setup.
-
Demo Application selected as AUT and set to launch automatically when you start recording.
-
Once you’re done, the solution will open in Ranorex Studio as shown below:
-
The empty recording module Recording1 is in the recording module view.
-
In the test suite view, Recording1 is located in a test case that has setup and teardown regions. The former contains a recording module that starts the Demo Application, the latter contains one that closes it.
Recorder default settings
There are many settings you can configure to customize the behavior of the Recorder.
The default settings are usually suitable for most recording tasks, including the ones in this chapter. However, for some recording tasks, you may need to change the Recorder settings.
To access them, click Settings in the toolbar of the Recorder working environment or the Ranorex Studio toolbar.
-
Global Recorder settings
-
Local Recorder settings valid for the current recording module
For more information about how to record a test, visit Record your first test.