Run and debug recordings | Ranorex Studio User Guide
Help CenterUser GuideRanorex Studio fundamentals

Run and debug recordings

In this chapter, you’ll learn how to run and debug recordings.

For now, we’ll focus on running a test recording in its simplest form: executing recorded actions one after another. In the larger context of test automation, running a test means executing iterations based on different sets of user data, parameters, and test scenarios. We’ll deal with this in later chapters.
In this chapter

    Screencast

    To see how to run a single recording, run a test case or test suite, execute individual steps in a recording, and enable Turbo mode or Debug mode, watch our video ⇢ Ranorex Studio Recorder basics 4: Run and debug a test

    Enable turbo mode

    By default, Ranorex Studio uses a predefined delay between actions to control how fast they’re replayed. You can enable Turbo mode to speed up replaying by reducing this delay to almost zero.

    In the recording module toolbar, click Turbo mode to turn turbo mode on or off.
    Turbo mode button in Ranorex Recorder

    Turbo mode button in Ranorex Recorder

    Note icon

    Note

    • Turbo mode is applied to all actions in the active recording module.

    Run a recording module

    This section demonstrates how to run a single recording module.

    Running a recording module

    Running a recording module

    In the Recorder view, click RUN.
    Watch as the run starts and progresses.
    When the run finishes, the test report appears.
    tipp icon

    Hint

    Remember: Don’t touch your mouse or keyboard during the test run, or you might cause a test failure.

    Further reading

    Test reports, their structure, content, and interpretation are described in Ranorex Studio fundamentals > Reporting >  ⇢ Introduction.

    Run a test case

    Running individual recording modules is usually only done when editing or troubleshooting them. Normally, tests are run based on test cases from the test suite view. The test suite is the central point of control for modularization and test case management.

    Further reading

    The test suite and its uses are explained in greater detail in Ranorex Studio fundamentals > Test suite > ⇢ Introduction.

    Switch to the test suite view

    There are two ways to switch to the test suite view.
    Switching to test suite view

    Switching to test suite view

    In the Studio toolbar, click the View test suite button.
    Alternatively, click the tab Introduction.rxtst (rxtst = Ranorex test suite file).
    tipp icon

    Hints

    • The example test suite has the same name as the test project: Introduction.
    • The current test suite contains one test case with the default name TestCase.
    • The test case contains setup and teardown regions.
    • The test case contains a recording module with the default name Recording1.
    • The ticked checkbox means the test case will be executed during the test run.

    Execute the test case

    Running a test case

    Running a test case

    In the test suite view, click RUN. This runs the entire test suite. In our example, the test suite contains one test case, so only this test case executes.
    Watch as the run starts and progresses.
    When the run finishes, the test report appears.
    Success test report

    Test report showing a successful run

    Further reading

    Reports, their structure, content, and interpretation are explained in greater detail in Ranorex Studio fundamentals > Reporting > ⇢ Introduction.

    Global run buttons

    You don’t have to be in the test suite view to run or stop a test suite. You can also click the global run and stop buttons in the Studio toolbar. They are always visible, regardless of your current view.

    Run & Stop shortcut buttons in Studio toolbar

    Global run and stop buttons in the Studio toolbar

    Run options

    Sometimes, you don’t want to run an entire recording, or you might want to control the run similar to debugging a computer program, as described below.

    Change to the Recorder view.
    Right-click an action and select one of the options explained below.
    Context menu on action item #4

    Context menu on action #4

    Run selected item(s)

    Runs only the selected action(s).

    Run to here (excl. selection)

    Runs the recording starting at action #1 and up to, but excluding, the selected action.

    Run from here

    Runs the recording starting at the selected action.

    Record from here (after selection)

    Starts a recording and adds the recorded actions between the selected action and the next.

    Debug – enable/disable on fail

    When an action causes an exception during a test, the default behavior is that the test aborts. Sometimes, you might want the run to continue instead. This is where the option Continue on fail is useful.

    Further reading

    The debugging option Continue on fail is part of the concept of actions and is explained in detail in Ranorex Studio fundamentals > Actions > ⇢ Managing actions.

    Debug – insert a log message

    When tests become complex, it’s often helpful to add special log messages to the report.

    Further reading

    Log messages and other options for controlling the test report are described in detail in  Ranorex Studio fundamentals > Reporting > ⇢ Basic report characteristics & data.

    Enable/disable debug mode

    Ranorex Studio includes a dedicated debug mode that works by setting breakpoints in programming code. This is an expert topic, which is why we only touch on it here briefly.

    Ranorex Studio debug mode

    Ranorex Studio debug mode

    Turning debug mode on/off

    Debug mode requires Ranorex Studio to be run as an administrator. If this isn’t the case, a prompt to restart in administrator mode appears.

    tipp icon

    Hint

    Debug mode decreases Ranorex Studio performance by around 30%.

    Further reading

    Debugging is an expert topic and is explained in Ranorex Studio expert > Ranorex Studio IDE > ⇢ Debugging.

    Download the sample solution

    Download our sample solution to try the steps and options explained in this chapter yourself.

    Sample solution

    Theme: Run and debug recordings
    Time: Less than 10min

    Download sample file

    Installation:

    Unzip to any folder on your computer.

    Start Ranorex Studio and open the solution file Introduction.rxsln.

    tipp icon

    Hint

    The sample solution is available for Ranorex Studio versions 8.0 or higher. You must accept the automatic solution upgrade for versions 8.2 and higher.