Preparation is key in test automation, whether your test is simple or complex. Taking a few minutes to prepare helps prevent mistakes and saves time later. This article describes the steps to take before you start recording your test.
Recording recommendations
Review the recommendations below to streamline your workflow and make day-to-day testing more efficient.
- Application under test (AUT): Decide how you want to start the AUT: manually each time, or automatically via Ranorex Studio when recording begins. In either case, make sure you know the installation path and any required startup parameters.
- Test data & parameters: Make sure you have all test data and parameters (for example, usernames and passwords) readily available before you start recording.
- AUT instances: Only run one instance of your AUT during recording. If you create your solution using the Solution Wizard and configure an AUT, Ranorex Studio can start (and close) the AUT automatically by default.
-
Recording interaction - Unless you use whitelisting, Ranorex captures all user actions during recording, including accidental actions that are unrelated to the AUT. Before you start recording, close or disable anything that could interfere (for example, pop-ups).
AUT: The Ranorex Demo Application
To demonstrate the concepts and methods in this User Guide, we use the Ranorex Demo Application as the application under test (AUT).
It serves as the AUT for the explanations and samples in the fundamentals and advanced chapters of this User Guide.
Download the latest version of Ranorex Demo Application and unzip it to any folder on your system.
Start the AUT
Before planning a test in detail, start the AUT to ensure that it is installed properly.
- Browse to the folder where you unzipped the Demo Application.
- Double-click the application to start it.
- The Demo Application’s Welcome screen appears.
- Verify that the Demo Application opens and works correctly, then close it.
Plan the recording
Plan your recording well. Good planning 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 to record mouse movements
- By default, Ranorex does not record mouse movements unless they include 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, a simple test is defined in 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.
- Finish the wizard. The solution opens in Ranorex Studio.
In the resulting solution:
- 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, and the latter contains one that closes it.
- The empty recording module Recording1 is in the recording module view.
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.
Click Settings in the toolbar of the Recorder working environment or the Ranorex Studio toolbar.
- Global Recorder settings
- Local Recorder settings are valid for the current recording module
For more information about how to record a test, visit Record your first test.