Ranorex Coach | Ranorex Studio User Guide
Help CenterUser GuideRanorex Coach

Introduction

The Ranorex Coach helps you stick to best practices in designing your tests. It does so by giving you short, non-intrusive hints when it detects certain behaviors (its triggers).

These hints contain tips how to improve your test and can help you avoid issues in the future.

On this page, you’ll find out how the Coach works, how you can enable/disable it or specific triggers, and you’ll find short descriptions of the hints it gives.

Reference

For more best practices in designing your test structure, also take a look at

Hands-on application topics > ⇢ Structure your tests

In this chapter

    Enable/disable the Coach

    By default, the Coach is enabled, including all hints. You can disable the Coach as a whole or only specific hints. To enable/disable:

    In Ranorex Studio, click Tools.

    Click Options.

    Click Ranorex Notifications.

    Click to enable/disable the Coach entirely.

    Click to enable/disable specific hints. See further below for a short explanation of all hints.

    How it works

    When the Coach detects a trigger, it displays a hint.  The Coach aims to be helpful without being intrusive. This is why:

    • It only checks for triggers and displays a hint when you save or close a file
    • It only shows one hint, even if multiple triggers are detected
    • It won‘t show a new hint until you‘ve dismissed an existing one and saved/closed a file again

    Coach hints are displayed as a small popup window in the bottom right of Ranorex Studio, where they‘re least likely to be in the way. You can close them in two ways:

    To close a hint and deactivate its specific trigger, click Always ignore this hint.

    To only close a hint, click Dismiss.

    Short best-practice suggestion

    More information on the topic, e.g. why it‘s a best practice

    Test suite hints

    Complex nested conditions/data source inheritance

    Trigger: The test suite contains conditions or data source inheritance that extend over too many test container levels.
    What to do:
    Keep it simple. Use conditions sparingly and don‘t use multiple data source over several nested test container levels.
    More information: ⇢ Best practices for structuring

    Empty test containers in test suite

    Trigger: The test suite contains at least one empty test container.
    What to do:
    Fill empty test containers with modules or delete them if they‘re no longer needed.

    Test case not preceded by setup region or followed by teardown region

    Trigger: The test suite contains at least one test case that isn‘t wrapped in at least one setup/teardown region.
    What to do:
    Make sure your test cases are wrapped in at least one setup/teardown region.
    More information:  ⇢ The test suite structure

    High number of test containers without descriptions

    Trigger: Fewer than half of your test containers have descriptions.
    What to do:
    Give all your test containers good descriptions.

    Data connector has default name

    Trigger: At least one data connector still has its default name, e.g. „NewConnector“.
    What to do:
    Give all data connectors good names.

    Not using run configurations

    Trigger: You have a test suite that has deselected test containers, but only one (likely the default) saved run configuration.
    What to do:
    Create and use run configurations if you want to regularly run your test with different test containers selected/deselected.
    More information:  ⇢ Execute a test suite

    Recording module hints

    Recording module contains no actions

    Trigger: At least one recording module contains no actions..
    What to do:
    Fill empty recording modules with actions or delete them if they‘re no longer needed.

    More than 30 actions in a recording module

    Trigger: At least one recording module contains too many actions
    What to do:
    Keep recording modules focused on a particular task and only include actions that are necessary for it.

    Mergeable Key sequence actions

    Trigger: At least one recording module contains subsequent Key sequence actions that look like they should be merged.
    What to do:
    Merge Key sequence actions that are fragments of a larger string.

    Key sequence action hard to read

    Trigger: At least one recording module contains Key sequence actions that contain non-text input.
    What to do:
    Remove unnecessary non-text input or simply activate Keystroke optimization.
    More information: ⇢ Action properties

    Disabled actions in recording modules

    Trigger: At least one recording module contains disabled actions.
    What to do:
    Unless you‘re troubleshooting, activate disabled actions or delete them if they‘re no longer needed.

    Action not linked to repository item

    Trigger: At least one action isn‘t linked to a repository item when it could be.
    What to do:
    Link actions to repository items, even when optional.

    Validation action preceded by Delay instead of WaitFor

    Trigger: Using a fixed Delay action before a Validation action to ensure a UI element can be found.
    What to do:
    Use a flexible Wait for action instead.
    More information: ⇢ Action properties

    Absolute path in Start application action

    Trigger: A Start application action contains an absolute path.
    What to do:
    Use a relative path.

    Network drive path in Start application action

    Trigger: A Start application action points to a network drive.
    What to do:
    Use a relative path that points to a local drive.

    Reversed mouse down/up actions

    Trigger: At least one recording contains Mouse up/down actions in reverse order.
    What to do:
    Ensure Mouse up/down actions are in correct order or use Mouse click action instead.

    Mouse wheel action used in recording module

    Trigger: At least one recording module contains a Mouse wheel action.
    What to do:
    Keyboard and Mouse actions usually scroll automatically. If this doesn’t work, try an Invoke action with the ‘EnsureVisible’ or ‘Focus’ argument. Alternatively, set the ‘Use Ensure Visible’ property to ‘True’ on repository items.
    More information:

    ⇢ Action properties

    ⇢ Manage repository items

    Repository hints

    Search timeout too low or too high

    Trigger: At least one repository item has a search timeout that is below 10 seconds or over 5 minutes.
    What to do:
    Keep the search timeout between the above numbers. 30 seconds is often a good value.

    Variable in rooted folder in the repository

    Trigger: At least one rooted folder in your repository contains a variable in its RanoreXPath.
    What to do:
    Avoid variables in rooted folder paths.