Run tests without Ranorex Studio | Ranorex Studio User Guide
Help CenterUser GuideRanorex Studio fundamentals

Run tests without Ranorex Studio

In addition to running tests from within Ranorex Studio, you can also run them with the stand-alone Ranorex Test Suite Runner or from the command line. In this chapter you’ll learn how to do so and which command line arguments are available.

In this chapter

    Ranorex runtime environment

    Ranorex Studio creates an executable file for every test suite. To execute a test suite in a runtime environment, you need to have this executable (*.EXE) and the test suite file (*.RXTST) in the same directory. If your Ranorex Studio solution consists of more than one project, you also need to ensure that the library (*.DLL) files are part of the same directory.

    Therefore, it’s best if you simply copy the complete output folder (e.g. \\bin\\Debug\\) to the runtime machine where you want to run the test.

    Ranorex runtime environment

    Ranorex runtime environment

    Project output folder
    Executable test project file
    Test suite file
    Library files (dlls)

    Ranorex Test Suite Runner

    The Test Suite Runner is a stand-alone program which executes test suites without Ranorex Studio. It opens automatically when you double-click a test suite file in Windows.

    Test suite runner

    Test suite runner

    In Windows, double-click a test suite file. The file opens in the Test Suite Runner.
    Click RUN.

    Stand-alone Test Suite Runner
    Currently loaded test suite

    Note icon


    You can use the Ranorex Test Suite Runner to execute the entire test suite, run certain test cases and smart folders, or just run a specific module.

    In addition, you can create new run configurations the same way as in Ranorex Studio.

    Run tests from the command line

    You can also run Ranorex tests from the command line, using the executable test project file.

    Running test suites at command line

    Running test suites from the command line

    Enter the name of the executable test file and press Enter.

    Command line return value

    A command line return value appears to indicate whether a test run was successful.

    Return value Meaning
    0 Successful test suite execution
    -1 Failure
    42 No valid license found

    Command line arguments

    You can pass arguments using the syntax /argument1 /argument2. Separate two or more arguments with a space.

    Getting help

    To see a list of all available command line arguments, pass the argument /help to the executable test project file.

    Getting help at command line

    Getting help at the command line

    Command line arguments

    The table below lists all available command line arguments. Most arguments have a full and a short version. You can use either as you like and even mix them. They are separated by a pipe | in the table below.

    Replace any text in square brackets with the respective values of your project.

    Argument Description
    /help|? Shows the help text including all available arguments.
    /listconfigparams|lcp Lists all settable configuration parameters and their values.
    /config|cfg:[config parameter name]=[value] Set values for configuration parameters.
    Example: /cfg:adapter.defaultsearchtimeout=1500ms

    /agent|a:"<agent name>"

    /agent|a:[“<agent-tag1>”, “<agent-tag2>”]


    Runs a test on the specified agent.
    The <agent name> is the name of the agent, the machine name, or the URL of the agent. Only one agent can be addressed.
    If Ranorex Studio can’t find an agent with the specified name, it will run a discovery and list all available configured agents in the network.
    The <agent-tag> is any tag added to an agent. The test will be run on an agent with this tag. If there are more agents with this tag, the one with the least jobs will be used.
    Separate tags with a trailing comma ,
    The argument ? runs a discovery and lists all available configured agents in the network.
    The argument agent takes care of all necessary actions for running a test on an agent, i.e. zipping the test files, deploying them, and executing the test.
    /endpoint|ep:[endpoint name] Display name of the endpoint to be used as the automation root during test execution. If no endpoint is specified ‘localhost‘ is used.
    /endpointconfig|epc:[configuration name] Set the configuration that will be used for this endpoint during test execution. Not all endpoint types support configurations.
    /endpointconfigfilepath|epcfp:[configuration filepath] Set the file path to the configuration that should be used for the endpoint during test execution.
    /maintenancemode|m Enables maintenance mode. Test run will be paused and a dialog is shown when a RanorexException is caught by the test suite runner.
    /testrail Reports the test run results to TestRail via API. Requires ‘truser‘ and ‘trpass‘ arguments.
    /truser Requires ‘testrail‘. Email used to sign in to TestRail.
    /trpass Requires ‘testrail‘. Password or API key for the user specified with ‘truser‘.
    /trrunid Requires ‘testrail‘: (Optional) The identifier of an existing test run in TestRail to receive test results. Without this argument a new test run is created.
    /trrunname Requires ‘testrail‘: (Optional) Creates a new test run in TestRail with the specified name to receive test results. Without this argument the default name is used.
    /reportfile|rf:[report file path] Sets the name (and path) of the report file. If no path is provided, the current folder is used. By default, the filename specified in the .rxtst file is used (for example: %S_%Y%M%D_%T.rxlog).
    /zipreport|zr Compresses the report (including associated files) to a single archive (.rxzlog extension).
    /junit|ju Creates the report in JUnit format as well. The report will be placed in the same location as the original Ranorex report.
    /zipreportfile|zrf:[zip report file path] When used with argument /zipreportfile sets the name (and path) of the compressed report file. If no path is provided, the path of the report file is used. If the file extension is not .rxzlog, the extension will be replaced with .rxzlog. By default, the report filename specified in the .rxtst file or the value of argument reportfile is used with an .rxzlog extension.
    /reportlevel|rl: None|Debug|Info|Warn|Error|Success|Failure|[any integer] Sets the minimum report level that log messages need to have in order to be included in the log file. Possible values are: None, Debug, Info, Warn, Error, Success, Failure, or any integer value. Specify ‘None’ to completely disable reporting. These levels correspond to the following integer values: Debug=10, Info=20, Warn=30, Error=40, Success=110, Failure=120.
    /listglobalparams|lp Lists all global parameters and their values.
    /listtestcaseparams|ltcpa:[name or guid of 'test case' or 'smart folder'] Lists all test case or smart folder parameters and their values.
    Example: /ltcpa:AddEntryByCodeModule
    /testcase|testcontainer|tc:[name or guid 'test case' or 'smart folder] Runs this test case or smart folder only.
    /testsuite|ts:[path to the test suite file]

    Runs the test cases defined by the test suite (.rxtst) file.
    By default

    • the rxtst file with the same name as the [TestSuiteExe] is used
    • or the first .rxtst file in the same folder as [TestSuiteExe].
    /runconfig|rc:[configuration name] Runs the test cases or smart folder of the specified run configuration. Run configurations can be edited using Ranorex Studio or TestSuiteRunner. By default, the currently selected run configuration is used.
    /module|mo:[module name or guid] Runs the module with the specified name or guid. Assemblies loaded by [TestSuiteExe] and assemblies referenced in the rxtst file are searched.
    /param|pa:[global parameter name]=[value] Creates or overrides values for global parameters.
    /testcaseparam|testcontainerparam|tcpa:[name or guid of 'test case' or 'smart folder']:[parameter name]=[value] Creates or overrides values for test case or smart folder parameters.
    /runlabel|rul:[custom value] Sets a custom runlabel for the test run.
    /testcasedatarange|testcontainerdatarange|tcdr:[name or guid of 'test case' or 'smart folder']=[data range] Sets the data range for a test case or smart folder.